diff options
author | Danny Baumann <dannybaumann@web.de> | 2012-01-24 14:04:50 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2012-01-24 14:04:50 +0100 |
commit | e38ef0c67e036fa96106846de7e0e80bb9039c6e (patch) | |
tree | c28c9d432718eefe36353f7b2ab2458206582cda | |
parent | 0df941c26aef7bccf8c8530b41bdc7e9af0aaa9e (diff) | |
download | staticswitcher-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.c | 19 |
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; |