diff options
Diffstat (limited to 'src/blocks')
| -rw-r--r-- | src/blocks/slider.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blocks/slider.c b/src/blocks/slider.c index 854b284..f4a9ad0 100644 --- a/src/blocks/slider.c +++ b/src/blocks/slider.c @@ -191,7 +191,7 @@ static void block_slider_event(layout_t *layout, config_t *config, event_t event int bar_height = slider->height; // NOTE: Consider disabling these actions for non seekable sliders - bool clicked = check_capsule(event.x, event.y, bar_x, bar_y, bar_width, bar_height); + bool clicked = check_capsule(event.mouse.x, event.mouse.y, bar_x, bar_y, bar_width, bar_height); action_t *action = layout->block->actions[event.type]; switch (event.type) { @@ -217,7 +217,7 @@ static void block_slider_event(layout_t *layout, config_t *config, event_t event action_perform(action, layout->block, config); if (slider->seekable && clicked) - slider->value = 100 * (event.x - bar_x) / (double)(bar_width - 1); + slider->value = 100 * (event.mouse.x - bar_x) / (double)(bar_width - 1); } else { action_perform(layout->block->actions[event.type], layout->block, config); |
