]> Dogcows Code - chaz/openbox/commitdiff
dont let focus fall back to strange windows like panels, only to normal windows and...
authorDana Jansens <danakj@orodu.net>
Tue, 16 Jul 2002 02:38:26 +0000 (02:38 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 16 Jul 2002 02:38:26 +0000 (02:38 +0000)
src/Screen.cc
src/Window.hh
src/Workspace.cc

index a01b08874e1c1a75ad6d0a2c990ff630a3e6b89e..f4c3dcadbee13b1c2bc5237535b1f0ef38a54dc0 100644 (file)
@@ -1189,7 +1189,7 @@ void BScreen::manageWindow(Window w) {
   BlackboxWindow *win = blackbox->searchWindow(w);
   if (! win)
     return;
-  if (win->isDesktop()) {
+  if (win->windowType() == BlackboxWindow::Type_Desktop) {
     // desktop windows cant do anything, so we remove all the normal window
     // stuff from them, they are only kept around so that we can keep them on
     // the bottom of the z-order
index 72cefe618a4d4513376922d80ccec88d649c4a09..328b5ffa5bb556ff32bbab11db9eac165dbc55eb 100644 (file)
@@ -321,7 +321,7 @@ public:
   inline bool isMaximizable(void) const { return functions & Func_Maximize; }
   inline bool isResizable(void) const { return functions & Func_Resize; }
   inline bool isClosable(void) const { return functions & Func_Close; }
-  inline bool isDesktop(void) const { return window_type == Type_Desktop; }
+  inline WindowType windowType(void) const { return window_type; }
 
   inline bool hasTitlebar(void) const { return decorations & Decor_Titlebar; }
 
index 586adbadcf3f3fa99a2dd790757aa00e58a5cc86..5c38cf05b9ecf47b8ebb6e15c5dc20abbb9f9692 100644 (file)
@@ -154,6 +154,9 @@ void Workspace::focusFallback(const BlackboxWindow *old_window) {
                                   end = stackingList.end();
       for (; it != end; ++it) {
         BlackboxWindow *tmp = *it;
+        if (! (tmp->windowType() == BlackboxWindow::Type_Dialog ||
+               tmp->windowType() == BlackboxWindow::Type_Normal))
+          continue; // don't fallback to special windows
         if (tmp && tmp->setInputFocus()) {
           // we found our new focus target
           newfocus = tmp;
This page took 0.029285 seconds and 4 git commands to generate.