diff options
author | Sergi Granell <xerpi.g.12@gmail.com> | 2017-09-25 11:57:37 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-10-13 13:56:48 +0300 |
commit | cafc652cf647adce97522478410f89e8c30e854b (patch) | |
tree | d4440eaf92eb55a0cb36d1688e39a89bedbfd46a | |
parent | be1090b5234a583ce82edfc3f562066717c41d73 (diff) |
compositor-wayland: use input region instead of opaque region to zxdg_shell_v6::set_window_geometry
The opaque region is a few pixels off due to the rounded corners
of the frame decorations, and, therefore, the input region
matches the window's geometry more closely.
Signed-off-by: Sergi Granell <xerpi.g.12@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | libweston/compositor-wayland.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index fc929364..00cc4d47 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -779,12 +779,6 @@ wayland_output_resize_surface(struct wayland_output *output) wl_surface_set_input_region(output->parent.surface, region); wl_region_destroy(region); - frame_opaque_rect(output->frame, &ix, &iy, &iwidth, &iheight); - region = wl_compositor_create_region(b->parent.compositor); - wl_region_add(region, ix, iy, iwidth, iheight); - wl_surface_set_opaque_region(output->parent.surface, region); - wl_region_destroy(region); - if (output->parent.xdg_surface) { zxdg_surface_v6_set_window_geometry(output->parent.xdg_surface, ix, @@ -793,6 +787,12 @@ wayland_output_resize_surface(struct wayland_output *output) iheight); } + frame_opaque_rect(output->frame, &ix, &iy, &iwidth, &iheight); + region = wl_compositor_create_region(b->parent.compositor); + wl_region_add(region, ix, iy, iwidth, iheight); + wl_surface_set_opaque_region(output->parent.surface, region); + wl_region_destroy(region); + width = frame_width(output->frame); height = frame_height(output->frame); } else { |