aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gwin/slider.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gwin/slider.c b/src/gwin/slider.c
index 4c91ede6..ace90365 100644
--- a/src/gwin/slider.c
+++ b/src/gwin/slider.c
@@ -262,6 +262,10 @@ void gwinSliderSetPosition(GHandle gh, int pos) {
if (gh->vmt != (gwinVMT *)&sliderVMT)
return;
+ // do not change the position if disabled
+ if (!gwinGetEnabled(gh))
+ return;
+
if (gsw->min <= gsw->max) {
if (pos < gsw->min) gsw->pos = gsw->min;
else if (pos > gsw->max) gsw->pos = gsw->max;