summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc28
-rw-r--r--src/Screen.hh10
2 files changed, 16 insertions, 22 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index f3a833c..7a65473 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.cc,v 1.26 2002/02/20 22:40:19 fluxgen Exp $ 25// $Id: Screen.cc,v 1.27 2002/02/20 23:04:51 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -1712,37 +1712,31 @@ void BScreen::hideGeometry(void) {
1712//-------------- nextWorkspace --------------- 1712//-------------- nextWorkspace ---------------
1713// Goes to the workspace "right" of the current 1713// Goes to the workspace "right" of the current
1714//-------------------------------------------- 1714//--------------------------------------------
1715void BScreen::nextWorkspace(void) { 1715void BScreen::nextWorkspace(const int delta) {
1716 if (getCurrentWorkspaceID()+1 > getCount()-1) 1716 changeWorkspaceID( (getCurrentWorkspaceID()+delta) % getCount());
1717 changeWorkspaceID(0);
1718 else
1719 changeWorkspaceID(getCurrentWorkspaceID()+1);
1720} 1717}
1721 1718
1722//------------- prevWorkspace ---------------- 1719//------------- prevWorkspace ----------------
1723// Goes to the workspace "left" of the current 1720// Goes to the workspace "left" of the current
1724//-------------------------------------------- 1721//--------------------------------------------
1725void BScreen::prevWorkspace(void) { 1722void BScreen::prevWorkspace(const int delta) {
1726 if (getCurrentWorkspaceID()-1 < 0) 1723 changeWorkspaceID( (getCurrentWorkspaceID()-delta+getCount()) % getCount());
1727 changeWorkspaceID(getCount()-1);
1728 else
1729 changeWorkspaceID(getCurrentWorkspaceID()-1);
1730} 1724}
1731 1725
1732//-------------- rightWorkspace --------------- 1726//-------------- rightWorkspace ---------------
1733// Goes to the workspace "right" of the current 1727// Goes to the workspace "right" of the current
1734//-------------------------------------------- 1728//--------------------------------------------
1735void BScreen::rightWorkspace(void) { 1729void BScreen::rightWorkspace(const int delta) {
1736 if (getCurrentWorkspaceID()+1 < getCount()) 1730 if (getCurrentWorkspaceID()+delta < getCount())
1737 changeWorkspaceID(getCurrentWorkspaceID()+1); 1731 changeWorkspaceID(getCurrentWorkspaceID()+delta);
1738} 1732}
1739 1733
1740//------------- leftWorkspace ---------------- 1734//------------- leftWorkspace ----------------
1741// Goes to the workspace "left" of the current 1735// Goes to the workspace "left" of the current
1742//-------------------------------------------- 1736//--------------------------------------------
1743void BScreen::leftWorkspace(void) { 1737void BScreen::leftWorkspace(const int delta) {
1744 if (getCurrentWorkspaceID() > 0) 1738 if (getCurrentWorkspaceID() >= delta)
1745 changeWorkspaceID(getCurrentWorkspaceID()-1); 1739 changeWorkspaceID(getCurrentWorkspaceID()-delta);
1746} 1740}
1747 1741
1748#ifdef GNOME 1742#ifdef GNOME
diff --git a/src/Screen.hh b/src/Screen.hh
index 0001ed0..6df6ca0 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Screen.hh,v 1.19 2002/02/20 22:41:13 fluxgen Exp $ 25// $Id: Screen.hh,v 1.20 2002/02/20 23:04:35 fluxgen Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -184,10 +184,10 @@ public:
184 int addWorkspace(void); 184 int addWorkspace(void);
185 int removeLastWorkspace(void); 185 int removeLastWorkspace(void);
186 //scroll workspaces 186 //scroll workspaces
187 void nextWorkspace(); 187 void nextWorkspace(const int delta);
188 void prevWorkspace(); 188 void prevWorkspace(const int delta);
189 void rightWorkspace(); 189 void rightWorkspace(const int delta);
190 void leftWorkspace(); 190 void leftWorkspace(const int delta);
191 191
192 void removeWorkspaceNames(void); 192 void removeWorkspaceNames(void);
193 void updateWorkspaceNamesAtom(void); 193 void updateWorkspaceNamesAtom(void);