summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-07-16 02:38:26 +0000
committerDana Jansens <danakj@orodu.net>2002-07-16 02:38:26 +0000
commitfb613db29ffcf1539c91f0ac0ca5d25cb4e593b5 (patch)
tree24919a943691710eb35237e995b0ccf931e7ac4e /src
parent5cf86b186c89ffb87f02ab732aa113ce8025dc2a (diff)
dont let focus fall back to strange windows like panels, only to normal windows and dialogs
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc2
-rw-r--r--src/Window.hh2
-rw-r--r--src/Workspace.cc3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index a01b0887..f4c3dcad 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -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
diff --git a/src/Window.hh b/src/Window.hh
index 72cefe61..328b5ffa 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -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; }
diff --git a/src/Workspace.cc b/src/Workspace.cc
index 586adbad..5c38cf05 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -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;