1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 03:50:30 +01:00

WINGs: inverted the direction for mouse wheel on WMSliders

The original choice may have looked mathematically correct, but it was
actually counter-intuitive and opposite to what every other application
do with sliders.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
Christophe CURIS
2014-11-15 19:40:32 +01:00
committed by Carlos R. Mafra
parent 01fbeab1d4
commit 082de93ca0

View File

@@ -410,16 +410,16 @@ static void handleActionEvents(XEvent * event, void *data)
switch (event->type) {
case ButtonPress:
if (event->xbutton.button == WINGsConfiguration.mouseWheelUp && !sPtr->flags.dragging) {
/* Wheel up */
if (event->xbutton.button == WINGsConfiguration.mouseWheelDown && !sPtr->flags.dragging) {
/* Wheel down */
if (sPtr->value + 1 <= sPtr->maxValue) {
WMSetSliderValue(sPtr, sPtr->value + 1);
if (sPtr->flags.continuous && sPtr->action) {
(*sPtr->action) (sPtr, sPtr->clientData);
}
}
} else if (event->xbutton.button == WINGsConfiguration.mouseWheelDown && !sPtr->flags.dragging) {
/* Wheel down */
} else if (event->xbutton.button == WINGsConfiguration.mouseWheelUp && !sPtr->flags.dragging) {
/* Wheel up */
if (sPtr->value - 1 >= sPtr->minValue) {
WMSetSliderValue(sPtr, sPtr->value - 1);
if (sPtr->flags.continuous && sPtr->action) {