1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-04-07 16:23:33 +02: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:
dan
2000-09-29 02:30:55 +00:00
parent 358e3346c3
commit 67642b7c20
2 changed files with 13 additions and 4 deletions

View File

@@ -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);
}