diff options
author | akir <akir> | 2004-10-16 22:20:05 (GMT) |
---|---|---|
committer | akir <akir> | 2004-10-16 22:20:05 (GMT) |
commit | 9a56a3cf1aba1a7a98b3bc8450c03a4a2a261933 (patch) | |
tree | 2fa162eadb12f7c9aa2322b6504d59a8b16b95cb /src | |
parent | a6d4a3563c524e5fd6ee9ca18c0f5126a493108d (diff) | |
download | fluxbox-9a56a3cf1aba1a7a98b3bc8450c03a4a2a261933.zip fluxbox-9a56a3cf1aba1a7a98b3bc8450c03a4a2a261933.tar.bz2 |
respect the users wish (followModel) to what happens if a window gets focus which is not on the current workspace
Diffstat (limited to 'src')
-rw-r--r-- | src/Ewmh.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index e5bf6b5..ce0afb5 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Ewmh.cc,v 1.51 2004/09/11 13:34:36 fluxgen Exp $ | 22 | // $Id: Ewmh.cc,v 1.52 2004/10/16 22:20:05 akir Exp $ |
23 | 23 | ||
24 | #include "Ewmh.hh" | 24 | #include "Ewmh.hh" |
25 | 25 | ||
@@ -617,9 +617,22 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, | |||
617 | // ce.window = window to focus | 617 | // ce.window = window to focus |
618 | 618 | ||
619 | winclient->focus(); | 619 | winclient->focus(); |
620 | if (winclient->fbwindow()) | 620 | if (winclient->fbwindow()) { |
621 | winclient->fbwindow()->raise(); | 621 | |
622 | 622 | FluxboxWindow* fbwin = winclient->fbwindow(); | |
623 | fbwin->raise(); | ||
624 | |||
625 | // if the raised window is on a different workspace | ||
626 | // we do what the user wish: | ||
627 | // either ignore|go to that workspace|get the window | ||
628 | if (fbwin->screen().currentWorkspaceID() != fbwin->workspaceNumber()) { | ||
629 | if (fbwin->screen().getFollowModel() == BScreen::FOLLOW_ACTIVE_WINDOW) { | ||
630 | fbwin->screen().changeWorkspaceID(fbwin->workspaceNumber()); | ||
631 | } else if (fbwin->screen().getFollowModel() == BScreen::FETCH_ACTIVE_WINDOW) { | ||
632 | fbwin->screen().sendToWorkspace(fbwin->screen().currentWorkspaceID(), fbwin); | ||
633 | } // else we ignore it. my favourite mode :) | ||
634 | } | ||
635 | } | ||
623 | return true; | 636 | return true; |
624 | } else if (ce.message_type == m_net_close_window) { | 637 | } else if (ce.message_type == m_net_close_window) { |
625 | if (winclient == 0) | 638 | if (winclient == 0) |