mirror of
https://github.com/gryf/wmaker.git
synced 2026-11-24 16:46:54 +01:00
Better behavior of mouse wheel actions (Control and SHift are now
accepted as modifiers to select how much it will actually scroll on each mouse wheel event).
This commit is contained in:
1 parent
358e3346c3
commit
67642b7c20
2 files changed
+13
-4
No files matched your search
+10
-4
@@ -816,15 +816,21 @@ handleActionEvents(XEvent *event, void *data)
|
||||
case ButtonPress:
|
||||
/* FIXME: change Mod1Mask with something else */
|
||||
if (event->xbutton.button==WINGsConfiguration.mouseWheelUp) {
|
||||
sPtr->flags.decrDown = 1;
|
||||
sPtr->flags.hitPart = WSDecrementPage;
|
||||
if (event->xbutton.state & ControlMask) {
|
||||
sPtr->flags.hitPart = WSDecrementLine;
|
||||
} else {
|
||||
sPtr->flags.hitPart = WSDecrementPage;
|
||||
}
|
||||
if (sPtr->action) {
|
||||
(*sPtr->action)(sPtr, sPtr->clientData);
|
||||
}
|
||||
}
|
||||
else if (event->xbutton.button==WINGsConfiguration.mouseWheelDown) {
|
||||
sPtr->flags.incrDown = 1;
|
||||
sPtr->flags.hitPart = WSIncrementPage;
|
||||
if (event->xbutton.state & ControlMask) {
|
||||
sPtr->flags.hitPart = WSIncrementLine;
|
||||
} else {
|
||||
sPtr->flags.hitPart = WSIncrementPage;
|
||||
}
|
||||
if (sPtr->action) {
|
||||
(*sPtr->action)(sPtr, sPtr->clientData);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user