make alt-tab skip modal windows
This commit is contained in:
parent
610a15ac47
commit
9eecd58bf3
4 changed files with 9 additions and 2 deletions
|
@ -53,7 +53,7 @@ namespace {
|
||||||
|
|
||||||
bool doSkipWindow(const Focusable &win, const ClientPattern *pat) {
|
bool doSkipWindow(const Focusable &win, const ClientPattern *pat) {
|
||||||
const FluxboxWindow *fbwin = win.fbwindow();
|
const FluxboxWindow *fbwin = win.fbwindow();
|
||||||
if (!fbwin || fbwin->isFocusHidden())
|
if (!fbwin || fbwin->isFocusHidden() || fbwin->isModal())
|
||||||
return true; // skip if no fbwindow or if focushidden
|
return true; // skip if no fbwindow or if focushidden
|
||||||
if (pat && !pat->match(win))
|
if (pat && !pat->match(win))
|
||||||
return true; // skip if it doesn't match the pattern
|
return true; // skip if it doesn't match the pattern
|
||||||
|
|
|
@ -54,8 +54,10 @@ public:
|
||||||
|
|
||||||
/// @return true if the focusable has input focus
|
/// @return true if the focusable has input focus
|
||||||
virtual bool isFocused() const { return m_focused; }
|
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; }
|
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
|
/// @return true if icon button should appear focused
|
||||||
bool getAttentionState() const { return m_attention_state; }
|
bool getAttentionState() const { return m_attention_state; }
|
||||||
|
|
|
@ -3306,6 +3306,10 @@ bool FluxboxWindow::acceptsFocus() const {
|
||||||
return (m_client ? m_client->acceptsFocus() : false);
|
return (m_client ? m_client->acceptsFocus() : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FluxboxWindow::isModal() const {
|
||||||
|
return (m_client ? m_client->isModal() : true);
|
||||||
|
}
|
||||||
|
|
||||||
const FbTk::PixmapWithMask &FluxboxWindow::icon() const {
|
const FbTk::PixmapWithMask &FluxboxWindow::icon() const {
|
||||||
return (m_client ? m_client->icon() : m_icon);
|
return (m_client ? m_client->icon() : m_icon);
|
||||||
}
|
}
|
||||||
|
|
|
@ -414,6 +414,7 @@ public:
|
||||||
FbTk::FbWindow &parent() { return m_parent; }
|
FbTk::FbWindow &parent() { return m_parent; }
|
||||||
|
|
||||||
bool acceptsFocus() const;
|
bool acceptsFocus() const;
|
||||||
|
bool isModal() const;
|
||||||
const FbTk::PixmapWithMask &icon() const;
|
const FbTk::PixmapWithMask &icon() const;
|
||||||
const FbTk::BiDiString &title() const;
|
const FbTk::BiDiString &title() const;
|
||||||
const FbTk::FbString &getWMClassName() const;
|
const FbTk::FbString &getWMClassName() const;
|
||||||
|
|
Loading…
Reference in a new issue