all repos — fluxbox @ 26c1cfcc07c88b02bd9aa1c23aca61d8a3a313ea

custom fork of the fluxbox windowmanager

stop focus cycling on explicit workspace changes

Otherwise implicit focus changes by the workspace change would be
perceived as focus stealing and the focus restored to the last window on
the original desktop
Thomas Lübking thomas.luebking@gmail.com
commit

26c1cfcc07c88b02bd9aa1c23aca61d8a3a313ea

parent

3d7b466e7aff343dee152d4937d824d2860aac6b

2 files changed, 5 insertions(+), 0 deletions(-)

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

@@ -1535,6 +1535,7 @@ /**

Goes to the workspace "right" of the current */ void BScreen::nextWorkspace(int delta) { + focusControl().stopCyclingFocus(); if (delta) changeWorkspaceID( (currentWorkspaceID() + delta) % numberOfWorkspaces()); else if (m_former_workspace)

@@ -1545,6 +1546,7 @@ /**

Goes to the workspace "left" of the current */ void BScreen::prevWorkspace(int delta) { + focusControl().stopCyclingFocus(); if (delta) changeWorkspaceID( (static_cast<signed>(numberOfWorkspaces()) + currentWorkspaceID() - (delta % numberOfWorkspaces())) % numberOfWorkspaces()); else if (m_former_workspace)

@@ -1555,6 +1557,7 @@ /**

Goes to the workspace "right" of the current */ void BScreen::rightWorkspace(int delta) { + focusControl().stopCyclingFocus(); if (currentWorkspaceID()+delta < numberOfWorkspaces()) changeWorkspaceID(currentWorkspaceID()+delta); }

@@ -1563,6 +1566,7 @@ /**

Goes to the workspace "left" of the current */ void BScreen::leftWorkspace(int delta) { + focusControl().stopCyclingFocus(); if (currentWorkspaceID() >= static_cast<unsigned int>(delta)) changeWorkspaceID(currentWorkspaceID()-delta); }
M src/WorkspaceCmd.ccsrc/WorkspaceCmd.cc

@@ -383,6 +383,7 @@

void JumpToWorkspaceCmd::execute() { BScreen *screen = Fluxbox::instance()->mouseScreen(); if (screen != 0) { + screen->focusControl().stopCyclingFocus(); int num = screen->numberOfWorkspaces(); int actual = m_workspace_num; // we need an extra +1, since it's subtracted in FbCommandFactory