aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2012-07-07 02:30:39 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2012-07-07 02:30:39 (GMT)
commit9eecd58bf30c8b1c0d72b9070bf91e2c60f32fa5 (patch)
tree340b04665d5df5305bdb59bf619aee8813b33d39
parent610a15ac47371c5cbd4c2dcf6eec696aec5bb4fa (diff)
downloadfluxbox_pavel-9eecd58bf30c8b1c0d72b9070bf91e2c60f32fa5.zip
fluxbox_pavel-9eecd58bf30c8b1c0d72b9070bf91e2c60f32fa5.tar.bz2
make alt-tab skip modal windows
-rw-r--r--src/FocusControl.cc2
-rw-r--r--src/Focusable.hh4
-rw-r--r--src/Window.cc4
-rw-r--r--src/Window.hh1
4 files changed, 9 insertions, 2 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 5bf113f..383de61 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -53,7 +53,7 @@ namespace {
53 53
54bool doSkipWindow(const Focusable &win, const ClientPattern *pat) { 54bool doSkipWindow(const Focusable &win, const ClientPattern *pat) {
55 const FluxboxWindow *fbwin = win.fbwindow(); 55 const FluxboxWindow *fbwin = win.fbwindow();
56 if (!fbwin || fbwin->isFocusHidden()) 56 if (!fbwin || fbwin->isFocusHidden() || fbwin->isModal())
57 return true; // skip if no fbwindow or if focushidden 57 return true; // skip if no fbwindow or if focushidden
58 if (pat && !pat->match(win)) 58 if (pat && !pat->match(win))
59 return true; // skip if it doesn't match the pattern 59 return true; // skip if it doesn't match the pattern
diff --git a/src/Focusable.hh b/src/Focusable.hh
index 679e00b..fd0705b 100644
--- a/src/Focusable.hh
+++ b/src/Focusable.hh
@@ -54,8 +54,10 @@ public:
54 54
55 /// @return true if the focusable has input focus 55 /// @return true if the focusable has input focus
56 virtual bool isFocused() const { return m_focused; } 56 virtual bool isFocused() const { return m_focused; }
57 /// @return return true if it can be focused 57 /// @return true if it can be focused
58 virtual bool acceptsFocus() const { return true; } 58 virtual bool acceptsFocus() const { return true; }
59 /// @return true if temporarily prevented from being focused
60 virtual bool isModal() const { return false; }
59 61
60 /// @return true if icon button should appear focused 62 /// @return true if icon button should appear focused
61 bool getAttentionState() const { return m_attention_state; } 63 bool getAttentionState() const { return m_attention_state; }
diff --git a/src/Window.cc b/src/Window.cc
index f5a2fe2..3c8f87b 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -3306,6 +3306,10 @@ bool FluxboxWindow::acceptsFocus() const {
3306 return (m_client ? m_client->acceptsFocus() : false); 3306 return (m_client ? m_client->acceptsFocus() : false);
3307} 3307}
3308 3308
3309bool FluxboxWindow::isModal() const {
3310 return (m_client ? m_client->isModal() : true);
3311}
3312
3309const FbTk::PixmapWithMask &FluxboxWindow::icon() const { 3313const FbTk::PixmapWithMask &FluxboxWindow::icon() const {
3310 return (m_client ? m_client->icon() : m_icon); 3314 return (m_client ? m_client->icon() : m_icon);
3311} 3315}
diff --git a/src/Window.hh b/src/Window.hh
index 0d2cadd..8c97c7b 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -414,6 +414,7 @@ public:
414 FbTk::FbWindow &parent() { return m_parent; } 414 FbTk::FbWindow &parent() { return m_parent; }
415 415
416 bool acceptsFocus() const; 416 bool acceptsFocus() const;
417 bool isModal() const;
417 const FbTk::PixmapWithMask &icon() const; 418 const FbTk::PixmapWithMask &icon() const;
418 const FbTk::BiDiString &title() const; 419 const FbTk::BiDiString &title() const;
419 const FbTk::FbString &getWMClassName() const; 420 const FbTk::FbString &getWMClassName() const;