diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-01 11:45:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-01 11:45:08 -0500 |
commit | b23bd8ea282ae853357d126d6cec0a82c683aaeb (patch) | |
tree | 0f3e5d4ce3adeeae7cf4d8646eb395dd2d0271f0 /examples | |
parent | d438a877fd331bbfa21a17b040dabc6335d2095c (diff) | |
parent | 1fe1d640425d87b104038ee23416e60bd9b9b2fc (diff) |
Merge pull request #544 from emersion/fix-views-outside-output-layout
Fix views outside output layout
Diffstat (limited to 'examples')
-rw-r--r-- | examples/output-layout.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/output-layout.c b/examples/output-layout.c index b9228692..d9325838 100644 --- a/examples/output-layout.c +++ b/examples/output-layout.c @@ -105,11 +105,11 @@ static void handle_output_frame(struct output_state *output, animate_cat(sample, output->output); - bool intersects = wlr_output_layout_intersects(sample->layout, - output->output, sample->x_offs, sample->y_offs, - sample->x_offs + 128, sample->y_offs + 128); - - if (intersects) { + struct wlr_box box = { + .x = sample->x_offs, .y = sample->y_offs, + .width = 128, .height = 128, + }; + if (wlr_output_layout_intersects(sample->layout, output->output, &box)) { float matrix[16]; // transform global coordinates to local coordinates @@ -122,7 +122,6 @@ static void handle_output_frame(struct output_state *output, &wlr_output->transform_matrix, local_x, local_y); wlr_render_with_matrix(sample->renderer, sample->cat_texture, &matrix); - } wlr_renderer_end(sample->renderer); |