Commit 513e3bd3 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Peter Hutterer

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's avatarCarlos Garnacho <>
Acked-by: Peter Hutterer's avatarPeter Hutterer <>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent fafdb0cc
......@@ -188,8 +188,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);
......@@ -443,9 +443,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);
if (xwl_screen->rootless) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment