aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 0e568a14..689956ad 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -52,16 +52,15 @@ static void render_surface(struct wlr_surface *surface,
.width = render_width, .height = render_height,
};
if (wlr_output_layout_intersects(desktop->layout, wlr_output, &render_box)) {
- struct wlr_box model_box = {
+ struct wlr_box project_box = {
.x = ox,
.y = oy,
.width = render_width,
.height = render_height,
};
float matrix[16];
- wlr_matrix_box_model(&matrix, &model_box, surface->current->transform,
- rotation);
- wlr_matrix_mul(&wlr_output->transform_matrix, &matrix, &matrix);
+ wlr_matrix_project_box(&matrix, &project_box, surface->current->transform,
+ rotation, &wlr_output->transform_matrix);
wlr_render_with_matrix(desktop->server->renderer, surface->texture,
&matrix);
@@ -170,7 +169,7 @@ static void render_decorations(struct roots_view *view,
ox *= output->scale;
oy *= output->scale;
- struct wlr_box model_box = {
+ struct wlr_box project_box = {
.x = ox,
.y = oy,
.width = deco_box.width,
@@ -178,9 +177,8 @@ static void render_decorations(struct roots_view *view,
};
float matrix[16];
- wlr_matrix_box_model(&matrix, &model_box, WL_OUTPUT_TRANSFORM_NORMAL,
- view->rotation);
- wlr_matrix_mul(&output->transform_matrix, &matrix, &matrix);
+ wlr_matrix_project_box(&matrix, &project_box, WL_OUTPUT_TRANSFORM_NORMAL,
+ view->rotation, &output->transform_matrix);
float color[4] = { 0.2, 0.2, 0.2, 1 };
wlr_render_colored_quad(desktop->server->renderer, &color, &matrix);
}