[PATCH] xwayland: Do set root clip with rootless

Adam Jackson ajax at redhat.com
Fri Nov 20 12:41:37 PST 2015


On Fri, 2015-11-20 at 18:41 +0100, Olivier Fourdan wrote:

> diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
> index f97f100..9101382 100644
> --- a/hw/xwayland/xwayland-output.c
> +++ b/hw/xwayland/xwayland-output.c
> @@ -164,9 +164,6 @@ update_screen_size(struct xwl_output *xwl_output, int width, int height)
>      struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
>      double mmpd;
>  
> -    if (xwl_screen->screen->root)
> -        SetRootClip(xwl_screen->screen, FALSE);
> -
>      xwl_screen->width = width;
>      xwl_screen->height = height;
>      xwl_screen->screen->width = width;

This is wrong when !rootless. Non-redirected windows need their border
clips updated and exposures generated when their storage (ie the root
window) changes size.

That existing conditional is effectively if (1), the root window exists
even if we're rootless, it just might not have pixel storage.  Should
instead be if (!xwl_screen->rootless).

> @@ -184,7 +181,6 @@ update_screen_size(struct xwl_output *xwl_output, int width, int height)
>      if (xwl_screen->screen->root) {
>          xwl_screen->screen->root->drawable.width = width;
>          xwl_screen->screen->root->drawable.height = height;
> -        SetRootClip(xwl_screen->screen, TRUE);
>          RRScreenSizeNotify(xwl_screen->screen);
>      }
>  

Same deal here, re-enabling the root clip is what revalidates the
window tree and generates exposures. The SetRootClip should be
conditional as above. The outer conditional can be removed since it's
always true (and we do want to update root window geometry even when
rootless).

- ajax


More information about the xorg-devel mailing list