Merge lp:~compiz-team/compiz-core/compiz-core.fix_869967 into lp:compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2861
Proposed branch: lp:~compiz-team/compiz-core/compiz-core.fix_869967
Merge into: lp:compiz-core/0.9.5
Diff against target: 46 lines (+23/-0)
1 file modified
src/window.cpp (+23/-0)
To merge this branch: bzr merge lp:~compiz-team/compiz-core/compiz-core.fix_869967
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Mirco Müller Pending
Review via email: mp+78611@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

code looks good, comment is clear

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/window.cpp'
2--- src/window.cpp 2011-10-05 18:00:49 +0000
3+++ src/window.cpp 2011-10-07 14:42:25 +0000
4@@ -2576,6 +2576,8 @@
5 XChangeProperty (s->dpy (), s->root (), Atoms::winActive,
6 XA_WINDOW, 32, PropModeReplace,
7 (unsigned char *) &priv->id, 1);
8+
9+ screen->priv->nextActiveWindow = priv->serverFrame;
10 }
11 else
12 {
13@@ -2661,6 +2663,7 @@
14 priv->id == screen->priv->nextActiveWindow)
15 {
16 CompWindow *ancestor;
17+ Window lastNextActiveWindow = screen->priv->nextActiveWindow;
18
19 if (priv->transientFor && priv->transientFor != screen->root ())
20 {
21@@ -2712,6 +2715,26 @@
22 }
23 else
24 screen->focusDefaultWindow ();
25+
26+ /* FIXME:
27+ * moveInputFocusTo and focusDefaultWindow should really
28+ * return booleans */
29+ if (lastNextActiveWindow != screen->priv->nextActiveWindow &&
30+ screen->priv->optionGetRaiseOnClick ())
31+ {
32+ /* If this window just got the focus because another window
33+ * was unmanaged then we should also raise it if click raise
34+ * is on, since another plugin might have raised another window
35+ * without wanting to focus it and this window will be beneath
36+ * it in the stack but above it in the active window history
37+ * so when the focus moves here this window should be raised
38+ * That's the tradeoff for maintaining a predictable focus order
39+ * as compared to eg a predictable stacking order */
40+
41+ CompWindow *nextActive = screen->findWindow (screen->priv->nextActiveWindow);
42+ if (nextActive)
43+ nextActive->raise ();
44+ }
45 }
46 }
47

Subscribers

People subscribed via source and target branches