From 082de93ca0b86451cde37ba73f9f46d9f81fcdaa Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 15 Nov 2014 19:40:32 +0100 Subject: [PATCH] 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 Signed-off-by: Carlos R. Mafra --- WINGs/wslider.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WINGs/wslider.c b/WINGs/wslider.c index a18987a0..cacf57ca 100644 --- a/WINGs/wslider.c +++ b/WINGs/wslider.c @@ -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) {