diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-23 14:58:42 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-07-23 14:58:42 +0300 |
commit | 99d980b5867b277d15d39731eb235bfa9695268e (patch) | |
tree | a5b332341bd119b7717af333b4f4381641c0c258 /src/ui/inputwidget.c | |
parent | bb401db8b648e6bc3d3f93281031b3164159bf1a (diff) |
Window: Mouse wheel events vs. split mode
Only process mouse wheel events on the root over which the mouse is currently.
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r-- | src/ui/inputwidget.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index 444f849d..525e2a33 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -1760,7 +1760,9 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) { | |||
1760 | closeMenu_Widget(clipMenu); | 1760 | closeMenu_Widget(clipMenu); |
1761 | } | 1761 | } |
1762 | else { | 1762 | else { |
1763 | openMenuFlags_Widget(clipMenu, mouseCoord_Window(get_Window()), iFalse); | 1763 | openMenuFlags_Widget(clipMenu, |
1764 | mouseCoord_Window(get_Window(), ev->button.which), | ||
1765 | iFalse); | ||
1764 | } | 1766 | } |
1765 | return iTrue; | 1767 | return iTrue; |
1766 | } | 1768 | } |
@@ -2058,7 +2060,7 @@ static void draw_InputWidget_(const iInputWidget *d) { | |||
2058 | iBool isHint = isHintVisible_InputWidget_(d); | 2060 | iBool isHint = isHintVisible_InputWidget_(d); |
2059 | const iBool isFocused = isFocused_Widget(w); | 2061 | const iBool isFocused = isFocused_Widget(w); |
2060 | const iBool isHover = isHover_Widget(w) && | 2062 | const iBool isHover = isHover_Widget(w) && |
2061 | contains_InputWidget_(d, mouseCoord_Window(get_Window())); | 2063 | contains_InputWidget_(d, mouseCoord_Window(get_Window(), 0)); |
2062 | if (d->inFlags & needUpdateBuffer_InputWidgetFlag) { | 2064 | if (d->inFlags & needUpdateBuffer_InputWidgetFlag) { |
2063 | updateBuffered_InputWidget_(iConstCast(iInputWidget *, d)); | 2065 | updateBuffered_InputWidget_(iConstCast(iInputWidget *, d)); |
2064 | } | 2066 | } |