summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-04-16 07:20:25 +0000
committerDana Jansens <danakj@orodu.net>2002-04-16 07:20:25 +0000
commit113181910a42893edb5e642e37546ab635bcac58 (patch)
tree358acd5f1263adc59e55edb2910472162b681c10 /src
parent251dd4034f3a3f11a190c06d7b69670dc87d219d (diff)
reversed tehmouse wheel buttons on the root window. scrolling up now goes to the next workspace.
Diffstat (limited to 'src')
-rw-r--r--src/openbox.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/openbox.cc b/src/openbox.cc
index 371feb4b..83c3e3d2 100644
--- a/src/openbox.cc
+++ b/src/openbox.cc
@@ -383,15 +383,16 @@ void Openbox::process_event(XEvent *e) {
screen->getRootmenu()->show();
}
} else if (e->xbutton.button == 4) {
- if ((screen->getCurrentWorkspaceID()-1)<0)
- screen->changeWorkspaceID(screen->getWorkspaceCount()-1);
+ if ((screen->getCurrentWorkspaceID() + 1) >
+ screen->getWorkspaceCount() - 1)
+ screen->changeWorkspaceID(0);
else
- screen->changeWorkspaceID(screen->getCurrentWorkspaceID()-1);
+ screen->changeWorkspaceID(screen->getCurrentWorkspaceID() + 1);
} else if (e->xbutton.button == 5) {
- if ((screen->getCurrentWorkspaceID()+1)>screen->getWorkspaceCount()-1)
- screen->changeWorkspaceID(0);
+ if ((screen->getCurrentWorkspaceID() - 1) < 0)
+ screen->changeWorkspaceID(screen->getWorkspaceCount() - 1);
else
- screen->changeWorkspaceID(screen->getCurrentWorkspaceID()+1);
+ screen->changeWorkspaceID(screen->getCurrentWorkspaceID() - 1);
}
}
}