summaryrefslogtreecommitdiff
path: root/src/blackbox.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-08-16 04:25:13 +0000
committerDana Jansens <danakj@orodu.net>2002-08-16 04:25:13 +0000
commita2db09b869a588e56f816a41e3e7f31140183406 (patch)
treeff88dbc292f3fd6ca725f2e6c0c1b394e14aaeef /src/blackbox.cc
parent544da8c704c14f2fd2533711dbf710c34d873e32 (diff)
ignore the EnterNotify for focusing when changing workspaces in an ACTIVE_WINDOW change, so that the right window gets focused, not the window under the mouse.
Diffstat (limited to 'src/blackbox.cc')
-rw-r--r--src/blackbox.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/blackbox.cc b/src/blackbox.cc
index ed12c559..efb782a5 100644
--- a/src/blackbox.cc
+++ b/src/blackbox.cc
@@ -574,6 +574,8 @@ void Blackbox::process_event(XEvent *e) {
has moved to a known window.
*/
e->xfocus.window = None;
+
+ no_focus = False; // focusing is back on
}
break;
@@ -682,8 +684,10 @@ void Blackbox::process_event(XEvent *e) {
if (win->isIconic())
win->deiconify(False, False);
if (! win->isStuck() &&
- (win->getWorkspaceNumber() != screen->getCurrentWorkspaceID()))
+ (win->getWorkspaceNumber() != screen->getCurrentWorkspaceID())) {
+ no_focus = True;
screen->changeWorkspaceID(win->getWorkspaceNumber());
+ }
if (win->isVisible() && win->setInputFocus()) {
win->getScreen()->getWorkspace(win->getWorkspaceNumber())->
raiseWindow(win);