aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-02-20 23:04:51 (GMT)
committerfluxgen <fluxgen>2002-02-20 23:04:51 (GMT)
commitf7c88e4da3b7e8e39711a70fd27d0c464ce1bcde (patch)
tree8c2dfb53daceee6c7e8d58149ac64a5f9c92da1f /src/Screen.cc
parent18931280a7d4e20cf4a4ec86b2eef18cecc815c4 (diff)
downloadfluxbox-f7c88e4da3b7e8e39711a70fd27d0c464ce1bcde.zip
fluxbox-f7c88e4da3b7e8e39711a70fd27d0c464ce1bcde.tar.bz2
parameter values for next/prev/right/leftWorkspace
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc28
1 files changed, 11 insertions, 17 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