summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-30 07:17:07 +0000
committerDana Jansens <danakj@orodu.net>2002-07-30 07:17:07 +0000
commita7515b6d85b9cdb97d2365559109af74e68f6ff8 (patch)
treeff05c4a2f8dcf0bf1c9573da011537819c57a08a
parent961d7eb5b388e284c697b4ab0fc96ce52f90ff0a (diff)
don't focus non-visible windows
-rw-r--r--src/Window.cc4
-rw-r--r--src/blackbox.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 1c49346c..cd8716e0 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1541,8 +1541,8 @@ void BlackboxWindow::configureShape(void) {
bool BlackboxWindow::setInputFocus(void) {
if (flags.focused) return True;
- assert((flags.stuck || // window must be on the current workspace or sticky
- blackbox_attrib.workspace == screen->getCurrentWorkspaceID()));
+ assert(flags.stuck || // window must be on the current workspace or sticky
+ blackbox_attrib.workspace == screen->getCurrentWorkspaceID());
/*
We only do this check for normal windows and dialogs because other windows
diff --git a/src/blackbox.cc b/src/blackbox.cc
index 66a62e55..a818f128 100644
--- a/src/blackbox.cc
+++ b/src/blackbox.cc
@@ -328,7 +328,8 @@ void Blackbox::process_event(XEvent *e) {
focus = True;
}
- if (focus && (win->isTransient() || win->getScreen()->doFocusNew()))
+ if (focus && (win->isTransient() || win->getScreen()->doFocusNew()) &&
+ win->isVisible())
win->setInputFocus();
} else {
BScreen *screen = searchScreen(e->xmaprequest.parent);