diff options
author | Sam Spilsbury <sam.spilsbury@canonical.com> | 2011-03-22 16:46:56 +0800 |
---|---|---|
committer | Sam Spilsbury <sam.spilsbury@canonical.com> | 2011-03-22 16:46:56 +0800 |
commit | 89c2611d0b9e956ddb437cf8a4155110da4903a1 (patch) | |
tree | c96d49e4db26d04843082adda43b8e9b01759d77 | |
parent | f6921b6f06b27c48437a439b91ddd96f2ec8395b (diff) | |
download | compiz-core-ubuntu-ubuntu-beta-1.tar.gz compiz-core-ubuntu-ubuntu-beta-1.tar.bz2 |
Revert "If an unexpected window gets focus (e.g. by a client calling XSetInputFocus directly), make sure that moving the input focus to a default window still works when that window is closed."ubuntu-beta-1
This reverts commit 1fb701594b78e950c031974d83c3566d1d648156.
There are some problems created by this commit, reverting for now until they
can be evauluated
Conflicts:
src/event.cpp
-rw-r--r-- | src/event.cpp | 12 | ||||
-rw-r--r-- | src/window.cpp | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/event.cpp b/src/event.cpp index a41d7b8..5c0769d 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -1876,8 +1876,11 @@ CompScreen::handleEvent (XEvent *event) state &= ~CompWindowStateDemandsAttentionMask; w->changeState (state); + + if (priv->nextActiveWindow == event->xfocus.window) + priv->nextActiveWindow = None; } - else + else if (event->xfocus.window == priv->root) { /* Don't ever let the focus go to the root * window except in grab cases @@ -1887,7 +1890,9 @@ CompScreen::handleEvent (XEvent *event) * the other window managers should handle that */ - if (event->xfocus.window == priv->root) + if (event->xfocus.detail == NotifyDetailNone || + (event->xfocus.mode == NotifyNormal && + event->xfocus.detail == NotifyInferior)) { priv->activeWindow = None; @@ -1898,9 +1903,6 @@ CompScreen::handleEvent (XEvent *event) screen->focusDefaultWindow (); } } - - if (priv->nextActiveWindow == event->xfocus.window) - priv->nextActiveWindow = None; } } else diff --git a/src/window.cpp b/src/window.cpp index f26f7cb..53fe4d8 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2014,9 +2014,8 @@ CompWindow::moveInputFocusTo () void CompWindow::moveInputFocusToOtherWindow () { - if ((priv->id = screen->activeWindow () || - priv->id == screen->priv->nextActiveWindow) || - screen->activeWindow () == None) + if (priv->id == screen->activeWindow () || + priv->id == screen->priv->nextActiveWindow) { CompWindow *ancestor; |