]> Dogcows Code - chaz/openbox/commitdiff
don't focus non-visible windows
authorDana Jansens <danakj@orodu.net>
Tue, 30 Jul 2002 07:17:07 +0000 (07:17 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 30 Jul 2002 07:17:07 +0000 (07:17 +0000)
src/Window.cc
src/blackbox.cc

index 1c49346c6ddaebe099f4567fd73c47a2d207e68e..cd8716e0769a5bdf46430d4ef8c7ad99d858f76b 100644 (file)
@@ -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
index 66a62e55fd32cfe5b45605644b6bd03760064f5b..a818f12818d323a2f3c3b5651ec761b90fa15858 100644 (file)
@@ -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);
This page took 0.033118 seconds and 4 git commands to generate.