]> Dogcows Code - chaz/openbox/commitdiff
reversed tehmouse wheel buttons on the root window. scrolling up now goes to the...
authorDana Jansens <danakj@orodu.net>
Tue, 16 Apr 2002 07:20:25 +0000 (07:20 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 16 Apr 2002 07:20:25 +0000 (07:20 +0000)
src/openbox.cc

index 371feb4b5a34626addb8b447322e9a5f32f9343d..83c3e3d2bb660621affa86c957b66ff288af30e8 100644 (file)
@@ -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);
           }
         }
       }
This page took 0.02948 seconds and 4 git commands to generate.