aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/slider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/slider.c')
-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;