make alt-tab skip modal windows
Mark Tiefenbruck mark@fluxbox.org
4 files changed,
9 insertions(+),
2 deletions(-)
M
src/FocusControl.cc
→
src/FocusControl.cc
@@ -53,7 +53,7 @@ namespace {
bool doSkipWindow(const Focusable &win, const ClientPattern *pat) { const FluxboxWindow *fbwin = win.fbwindow(); - if (!fbwin || fbwin->isFocusHidden()) + if (!fbwin || fbwin->isFocusHidden() || fbwin->isModal()) return true; // skip if no fbwindow or if focushidden if (pat && !pat->match(win)) return true; // skip if it doesn't match the pattern
M
src/Focusable.hh
→
src/Focusable.hh
@@ -54,8 +54,10 @@ virtual bool focus() { return false; }
/// @return true if the focusable has input focus virtual bool isFocused() const { return m_focused; } - /// @return return true if it can be focused + /// @return true if it can be focused virtual bool acceptsFocus() const { return true; } + /// @return true if temporarily prevented from being focused + virtual bool isModal() const { return false; } /// @return true if icon button should appear focused bool getAttentionState() const { return m_attention_state; }
M
src/Window.cc
→
src/Window.cc
@@ -3306,6 +3306,10 @@ bool FluxboxWindow::acceptsFocus() const {
return (m_client ? m_client->acceptsFocus() : false); } +bool FluxboxWindow::isModal() const { + return (m_client ? m_client->isModal() : true); +} + const FbTk::PixmapWithMask &FluxboxWindow::icon() const { return (m_client ? m_client->icon() : m_icon); }
M
src/Window.hh
→
src/Window.hh
@@ -414,6 +414,7 @@ const FbTk::FbWindow &parent() const { return m_parent; }
FbTk::FbWindow &parent() { return m_parent; } bool acceptsFocus() const; + bool isModal() const; const FbTk::PixmapWithMask &icon() const; const FbTk::BiDiString &title() const; const FbTk::FbString &getWMClassName() const;