all repos — fluxbox @ 9a56a3cf1aba1a7a98b3bc8450c03a4a2a261933

custom fork of the fluxbox windowmanager

respect the users wish (followModel) to what happens if a window gets focus which is not on the current workspace
akir akir
commit

9a56a3cf1aba1a7a98b3bc8450c03a4a2a261933

parent

a6d4a3563c524e5fd6ee9ca18c0f5126a493108d

1 files changed, 16 insertions(+), 3 deletions(-)

jump to
M src/Ewmh.ccsrc/Ewmh.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.51 2004/09/11 13:34:36 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.52 2004/10/16 22:20:05 akir Exp $ #include "Ewmh.hh"

@@ -617,9 +617,22 @@ return true;

// ce.window = window to focus winclient->focus(); - if (winclient->fbwindow()) - winclient->fbwindow()->raise(); + if (winclient->fbwindow()) { + + FluxboxWindow* fbwin = winclient->fbwindow(); + fbwin->raise(); + // if the raised window is on a different workspace + // we do what the user wish: + // either ignore|go to that workspace|get the window + if (fbwin->screen().currentWorkspaceID() != fbwin->workspaceNumber()) { + if (fbwin->screen().getFollowModel() == BScreen::FOLLOW_ACTIVE_WINDOW) { + fbwin->screen().changeWorkspaceID(fbwin->workspaceNumber()); + } else if (fbwin->screen().getFollowModel() == BScreen::FETCH_ACTIVE_WINDOW) { + fbwin->screen().sendToWorkspace(fbwin->screen().currentWorkspaceID(), fbwin); + } // else we ignore it. my favourite mode :) + } + } return true; } else if (ce.message_type == m_net_close_window) { if (winclient == 0)