diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 2037c75d..341563dc 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -29,6 +29,9 @@ changes since wmaker 0.62.1: will scroll by 1/3 of the WMList height. Using Control as a modifier will scroll line by line, while using Shift as a modifier will scroll page by page. +- better behavior of WMScroller regarding mouse wheel events. Control modifier + will scroll line by line, while Shift modifier will scroll page by page. + changes since wmaker 0.62.0: ............................ diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c index f9ed9602..72945857 100644 --- a/WINGs/wscroller.c +++ b/WINGs/wscroller.c @@ -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); }