reversed tehmouse wheel buttons on the root window. scrolling up now goes to the next workspace.
This commit is contained in:
parent
251dd4034f
commit
113181910a
1 changed files with 8 additions and 7 deletions
|
@ -383,15 +383,16 @@ void Openbox::process_event(XEvent *e) {
|
||||||
screen->getRootmenu()->show();
|
screen->getRootmenu()->show();
|
||||||
}
|
}
|
||||||
} else if (e->xbutton.button == 4) {
|
} else if (e->xbutton.button == 4) {
|
||||||
|
if ((screen->getCurrentWorkspaceID() + 1) >
|
||||||
|
screen->getWorkspaceCount() - 1)
|
||||||
|
screen->changeWorkspaceID(0);
|
||||||
|
else
|
||||||
|
screen->changeWorkspaceID(screen->getCurrentWorkspaceID() + 1);
|
||||||
|
} else if (e->xbutton.button == 5) {
|
||||||
if ((screen->getCurrentWorkspaceID() - 1) < 0)
|
if ((screen->getCurrentWorkspaceID() - 1) < 0)
|
||||||
screen->changeWorkspaceID(screen->getWorkspaceCount() - 1);
|
screen->changeWorkspaceID(screen->getWorkspaceCount() - 1);
|
||||||
else
|
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);
|
|
||||||
else
|
|
||||||
screen->changeWorkspaceID(screen->getCurrentWorkspaceID()+1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue