compiz/compiz-0.8.6-focus-denied-stacking-fix.patch
Adel Gadllah 462792cdb0 Some upstream fixes from git
Backport some minior fixes from upstream:

1bed3dbcea6473f84745ec7a1f936c4f5d3b3a01
a86c461684f122fd286884c4ff28f6ea673fe669
984bca5801d6179b9f8081c4b6c466063975d940
2010-07-30 18:11:16 +02:00

46 lines
1.5 KiB
Diff

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