diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-08-18 19:26:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-18 19:26:36 -0400 |
commit | d0a24465d75cc7197ee253e1de9fa961071cd034 (patch) | |
tree | 916f9f40b9f587d3cd24a8d7b2185b5c7808cfa4 /sway/desktop/render.c | |
parent | 373f0254a8d28511897e19ada1487b9115fc2019 (diff) | |
parent | ce78f6770e9c950d5335bedfd123979428561ae1 (diff) | |
download | sway-d0a24465d75cc7197ee253e1de9fa961071cd034.tar.xz |
Merge pull request #2466 from RyanDwyer/geometry
Fix geometry
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 6e1e31f0..7c48d0d2 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -193,9 +193,11 @@ static void render_view_toplevels(struct sway_view *view, .alpha = alpha, }; // Render all toplevels without descending into popups - output_surface_for_each_surface(output, view->surface, - view->swayc->current.view_x - output->wlr_output->lx, - view->swayc->current.view_y - output->wlr_output->ly, + double ox = + view->swayc->current.view_x - output->wlr_output->lx - view->geometry.x; + double oy = + view->swayc->current.view_y - output->wlr_output->ly - view->geometry.y; + output_surface_for_each_surface(output, view->surface, ox, oy, render_surface_iterator, &data); } @@ -227,8 +229,10 @@ static void render_saved_view(struct sway_view *view, return; } struct wlr_box box = { - .x = view->swayc->current.view_x - output->swayc->current.swayc_x, - .y = view->swayc->current.view_y - output->swayc->current.swayc_y, + .x = view->swayc->current.view_x - output->swayc->current.swayc_x - + view->saved_geometry.x, + .y = view->swayc->current.view_y - output->swayc->current.swayc_y - + view->saved_geometry.y, .width = view->saved_buffer_width, .height = view->saved_buffer_height, }; |