From 72316940726b34e7183652b0fa39092c67c419d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 16 Jul 2012 21:57:11 +0200 Subject: [PATCH] don't try to raise unmapped input windows or screenedges over unmapped causes race with kscreenlocker BUG: 303579 REVIEW: 105585 FIXED-IN: 4.10 --- effects.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/effects.cpp b/effects.cpp index 6b8e71b160..216a45c720 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1077,13 +1077,16 @@ void EffectsHandlerImpl::checkInputWindowStacking() if (XGetWindowAttributes(display(), it.second, &attr) && attr.map_state != IsUnmapped) wins[pos++] = it.second; } - XRaiseWindow(display(), wins[0]); - XRestackWindows(display(), wins, pos); + if (pos) { + XRaiseWindow(display(), wins[0]); + XRestackWindows(display(), wins, pos); + } delete[] wins; // Raise electric border windows above the input windows // so they can still be triggered. TODO: Do both at once. #ifdef KWIN_BUILD_SCREENEDGES - Workspace::self()->screenEdge()->ensureOnTop(); + if (pos) + Workspace::self()->screenEdge()->ensureOnTop(); #endif }