aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 1205d79..ff44f14 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1535,6 +1535,7 @@ void BScreen::setLayer(FbTk::LayerItem &item, int layernum) {
1535 Goes to the workspace "right" of the current 1535 Goes to the workspace "right" of the current
1536*/ 1536*/
1537void BScreen::nextWorkspace(int delta) { 1537void BScreen::nextWorkspace(int delta) {
1538 focusControl().stopCyclingFocus();
1538 if (delta) 1539 if (delta)
1539 changeWorkspaceID( (currentWorkspaceID() + delta) % numberOfWorkspaces()); 1540 changeWorkspaceID( (currentWorkspaceID() + delta) % numberOfWorkspaces());
1540 else if (m_former_workspace) 1541 else if (m_former_workspace)
@@ -1545,6 +1546,7 @@ void BScreen::nextWorkspace(int delta) {
1545 Goes to the workspace "left" of the current 1546 Goes to the workspace "left" of the current
1546*/ 1547*/
1547void BScreen::prevWorkspace(int delta) { 1548void BScreen::prevWorkspace(int delta) {
1549 focusControl().stopCyclingFocus();
1548 if (delta) 1550 if (delta)
1549 changeWorkspaceID( (static_cast<signed>(numberOfWorkspaces()) + currentWorkspaceID() - (delta % numberOfWorkspaces())) % numberOfWorkspaces()); 1551 changeWorkspaceID( (static_cast<signed>(numberOfWorkspaces()) + currentWorkspaceID() - (delta % numberOfWorkspaces())) % numberOfWorkspaces());
1550 else if (m_former_workspace) 1552 else if (m_former_workspace)
@@ -1555,6 +1557,7 @@ void BScreen::prevWorkspace(int delta) {
1555 Goes to the workspace "right" of the current 1557 Goes to the workspace "right" of the current
1556*/ 1558*/
1557void BScreen::rightWorkspace(int delta) { 1559void BScreen::rightWorkspace(int delta) {
1560 focusControl().stopCyclingFocus();
1558 if (currentWorkspaceID()+delta < numberOfWorkspaces()) 1561 if (currentWorkspaceID()+delta < numberOfWorkspaces())
1559 changeWorkspaceID(currentWorkspaceID()+delta); 1562 changeWorkspaceID(currentWorkspaceID()+delta);
1560} 1563}
@@ -1563,6 +1566,7 @@ void BScreen::rightWorkspace(int delta) {
1563 Goes to the workspace "left" of the current 1566 Goes to the workspace "left" of the current
1564*/ 1567*/
1565void BScreen::leftWorkspace(int delta) { 1568void BScreen::leftWorkspace(int delta) {
1569 focusControl().stopCyclingFocus();
1566 if (currentWorkspaceID() >= static_cast<unsigned int>(delta)) 1570 if (currentWorkspaceID() >= static_cast<unsigned int>(delta))
1567 changeWorkspaceID(currentWorkspaceID()-delta); 1571 changeWorkspaceID(currentWorkspaceID()-delta);
1568} 1572}