compiz/compiz-0.8.6-focus-denied-stacking-fix.patch

46 lines
1.5 KiB
Diff
Raw Normal View History

From 984bca5801d6179b9f8081c4b6c466063975d940 Mon Sep 17 00:00:00 2001
From: Owen W. Taylor <otaylor@fishsoup.net>
Date: Tue, 22 Jun 2010 23:29:17 +0000
Subject: Don't stack focus-denied windows in a disallowed position
When a window is focus-stealing-prevented, we should only stack
it below the active window if that is possible. If it's not
(the window has the "Above" state, for example), then we should
stack it at the normal location.
http://bugs.opencompositing.org/show_bug.cgi?id=1304
---
diff --git a/src/window.c b/src/window.c
index 60b47b9..0cfeee9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4447,14 +4447,19 @@ updateWindowAttributes (CompWindow *w,
if (p->id == w->screen->display->activeWindow)
break;
- /* window is above active window so we should lower it */
- if (p)
+ /* window is above active window so we should lower it, assuming
+ * that is allowed (if, for example, our window has the "above" state,
+ * then lowering beneath the active window may not be allowed.)
+ */
+ if (p && validSiblingBelow (p, w))
+ {
p = findValidStackSiblingBelow (sibling, p);
- /* if we found a valid sibling under the active window, it's
- our new sibling we want to stack above */
- if (p)
- sibling = p;
+ /* if we found a valid sibling under the active window, it's
+ our new sibling we want to stack above */
+ if (p)
+ sibling = p;
+ }
}
mask |= addWindowStackChanges (w, &xwc, sibling);
--
cgit v0.8.3.1-30-gff3a