From 99d980b5867b277d15d39731eb235bfa9695268e Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 23 Jul 2021 14:58:42 +0300 Subject: Window: Mouse wheel events vs. split mode Only process mouse wheel events on the root over which the mouse is currently. --- src/ui/mediaui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/mediaui.c') diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c index 22924876..b622a554 100644 --- a/src/ui/mediaui.c +++ b/src/ui/mediaui.c @@ -62,7 +62,7 @@ void init_PlayerUI(iPlayerUI *d, const iPlayer *player, iRect bounds) { } static void drawPlayerButton_(iPaint *p, iRect rect, const char *label, int font) { - const iInt2 mouse = mouseCoord_Window(get_Window()); + const iInt2 mouse = mouseCoord_Window(get_Window(), 0); const iBool isHover = contains_Rect(rect, mouse); const iBool isPressed = isHover && (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON_LEFT) != 0; const int frame = (isPressed ? uiTextCaution_ColorId : isHover ? uiHeading_ColorId : uiAnnotation_ColorId); @@ -159,7 +159,7 @@ void draw_PlayerUI(iPlayerUI *d, iPaint *p) { dot); /* Volume adjustment. */ if (isAdjusting) { - const iInt2 mouse = mouseCoord_Window(get_Window()); + const iInt2 mouse = mouseCoord_Window(get_Window(), 0); const iBool isHover = contains_Rect(d->volumeRect, mouse) && ~flags_Player(d->player) & volumeGrabbed_PlayerFlag; const iBool isPressed = (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON_LEFT) != 0; -- cgit v1.2.3