From 113181910a42893edb5e642e37546ab635bcac58 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 16 Apr 2002 07:20:25 +0000 Subject: [PATCH] reversed tehmouse wheel buttons on the root window. scrolling up now goes to the next workspace. --- src/openbox.cc | 13 +++++++------ 1 file 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); } } } -- 2.45.2