summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-05-28 15:56:19 +0200
committerAdam Jackson <ajax@redhat.com>2017-09-25 15:34:10 -0400
commit2ccea152c091e25474a83588e18475567471e7c8 (patch)
treed75f1d47c09c72b3d1e187bcf7e7d448dad0a503
parent0e5b08f2eef946e9d9d071f0a79ead379419d8a7 (diff)
xwayland: Update root window size when desktop size changes
This fixes grabs on InputOnly windows whose parent is the root window failing with GrabNotViewable. This is due to window->borderSize/windowSize being computed as clipped by its parent, resulting in a null region. Setting up the right size on the root window makes the InputOnly size correct too, so the GrabNotViewable paths aren't hit anymore. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 513e3bd3870fdb8a8e0e2e52c0fa93872300bc8b)
-rw-r--r--hw/xwayland/xwayland-output.c3
-rw-r--r--hw/xwayland/xwayland.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index a4bc185da..5a0f739f3 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -187,8 +187,11 @@ update_screen_size(struct xwl_output *xwl_output, int width, int height)
SetRootClip(xwl_screen->screen, xwl_screen->root_clip_mode);
if (xwl_screen->screen->root) {
+ BoxRec box = { 0, 0, width, height };
+
xwl_screen->screen->root->drawable.width = width;
xwl_screen->screen->root->drawable.height = height;
+ RegionReset(&xwl_screen->screen->root->winSize, &box);
RRScreenSizeNotify(xwl_screen->screen);
}
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 4ccea1a1f..939f3392c 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -334,9 +334,11 @@ xwl_realize_window(WindowPtr window)
screen->RealizeWindow = xwl_realize_window;
if (xwl_screen->rootless && !window->parent) {
+ BoxRec box = { 0, 0, xwl_screen->width, xwl_screen->height };
+
+ RegionReset(&window->winSize, &box);
RegionNull(&window->clipList);
RegionNull(&window->borderClip);
- RegionNull(&window->winSize);
}
if (xwl_screen->rootless) {