From f778b56a742cf9df6641f2ec525120e859c74fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 19 Aug 2022 12:51:20 +0200 Subject: [PATCH] dix: Skip more code in SetRootClip for ROOT_CLIP_INPUT_ONLY Despite e957a2e5dd28 ("dix: Add hybrid full-size/empty-clip mode to SetRootClip"), I was still seeing all X11 client windows flashing when the root window size changes with rootless Xwayland (e.g. due to hotplugging a monitor). Skipping this code for ROOT_CLIP_INPUT_ONLY fixes the issue for me. --- dix/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/window.c b/dix/window.c index cd917f006..284aa6dd7 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3642,7 +3642,7 @@ SetRootClip(ScreenPtr pScreen, int enable) if (!pWin) return; WasViewable = (Bool) (pWin->viewable); - if (WasViewable) { + if (WasViewable && mode != ROOT_CLIP_INPUT_ONLY) { for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { (void) (*pScreen->MarkOverlappedWindows) (pChild, pChild, &pLayerWin); @@ -3696,7 +3696,7 @@ SetRootClip(ScreenPtr pScreen, int enable) ResizeChildrenWinSize(pWin, 0, 0, 0, 0); - if (WasViewable) { + if (WasViewable && mode != ROOT_CLIP_INPUT_ONLY) { if (pWin->firstChild) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild, pWin->firstChild,