1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

Fixed scrolling directions for mice wheels.

This commit is contained in:
dan
2000-10-26 23:52:07 +00:00
parent b1baf21532
commit af5e3da105

View File

@@ -1313,7 +1313,8 @@ scrollersCallBack(WMWidget *w, void *self)
if (tPtr->vpos>16) tPtr->vpos-=16; if (tPtr->vpos>16) tPtr->vpos-=16;
else tPtr->vpos=0; else tPtr->vpos=0;
scroll=True; scroll=True;
}break; }
break;
case WSIncrementLine: { case WSIncrementLine: {
int limit = tPtr->docHeight - height; int limit = tPtr->docHeight - height;
@@ -1321,7 +1322,9 @@ scrollersCallBack(WMWidget *w, void *self)
if (tPtr->vpos<limit-16) tPtr->vpos+=16; if (tPtr->vpos<limit-16) tPtr->vpos+=16;
else tPtr->vpos=limit; else tPtr->vpos=limit;
scroll = True; scroll = True;
}}break; }
}
break;
case WSDecrementPage: case WSDecrementPage:
if(((int)tPtr->vpos - (int)height) >= 0) if(((int)tPtr->vpos - (int)height) >= 0)
@@ -1337,7 +1340,7 @@ scrollersCallBack(WMWidget *w, void *self)
if (tPtr->vpos > (tPtr->docHeight - height)) if (tPtr->vpos > (tPtr->docHeight - height))
tPtr->vpos = tPtr->docHeight - height; tPtr->vpos = tPtr->docHeight - height;
scroll = True; scroll = True;
break; break;
case WSKnob: case WSKnob:
@@ -2405,13 +2408,13 @@ handleActionEvents(XEvent *event, void *data)
if (event->xbutton.button if (event->xbutton.button
== WINGsConfiguration.mouseWheelDown) { == WINGsConfiguration.mouseWheelDown) {
WMScrollText(tPtr, -16); WMScrollText(tPtr, 16);
break; break;
} }
if (event->xbutton.button if (event->xbutton.button
== WINGsConfiguration.mouseWheelUp) { == WINGsConfiguration.mouseWheelUp) {
WMScrollText(tPtr, 16); WMScrollText(tPtr, -16);
break; break;
} }