summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2012-01-24 14:04:50 +0100
committerDanny Baumann <dannybaumann@web.de>2012-01-24 14:04:50 +0100
commite38ef0c67e036fa96106846de7e0e80bb9039c6e (patch)
treec28c9d432718eefe36353f7b2ab2458206582cda
parent0df941c26aef7bccf8c8530b41bdc7e9af0aaa9e (diff)
downloadstaticswitcher-compiz-0.8.tar.gz
staticswitcher-compiz-0.8.tar.bz2
Fix window MRU order.compiz-0.8
Commit 0df941c26aef7bccf8c8530b41bdc7e9af0aaa9e introduced giving selected windows focus in order to allow keyboard shortcuts being run on them. This had the unwanted side effect of messing up the MRU order. Fix that by not moving focus, but just temporarily changing activeWindow.
-rw-r--r--staticswitcher.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/staticswitcher.c b/staticswitcher.c
index 1b3c585..9143ade 100644
--- a/staticswitcher.c
+++ b/staticswitcher.c
@@ -474,7 +474,7 @@ switchToWindow (CompScreen *s,
}
ss->selectedWindow = w;
- moveInputFocusToWindow (w);
+ s->display->activeWindow = w->id;
if (old != w)
{
@@ -760,20 +760,11 @@ switchTerminate (CompDisplay *d,
}
ss->switching = FALSE;
+ d->activeWindow = sd->lastActiveWindow;
- if (state & CompActionStateCancel)
- {
- ss->selectedWindow = NULL;
- if (d->activeWindow != sd->lastActiveWindow)
- {
- w = findWindowAtDisplay (d, sd->lastActiveWindow);
- if (w)
- moveInputFocusToWindow (w);
- }
- }
-
- if (state && ss->selectedWindow && !ss->selectedWindow->destroyed)
- sendWindowActivationRequest (s, ss->selectedWindow->id);
+ if (state && !(state & CompActionStateCancel))
+ if (ss->selectedWindow && !ss->selectedWindow->destroyed)
+ sendWindowActivationRequest (s, ss->selectedWindow->id);
removeScreenGrab (s, ss->grabIndex, 0);
ss->grabIndex = 0;