From 5a31d56c9f9546838b602d0226e341dd30030edf Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 15 Mar 2020 20:34:49 +0100 Subject: [PATCH] Fix mouse events sent to wrong GUI elements when dragging --- src/gui/guiFormSpecMenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index 9f20877a9..012ac953f 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -3661,7 +3661,8 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event) // Mouse wheel and move events: send to hovered element instead of focused if (event.EventType == EET_MOUSE_INPUT_EVENT && (event.MouseInput.Event == EMIE_MOUSE_WHEEL || - event.MouseInput.Event == EMIE_MOUSE_MOVED)) { + (event.MouseInput.Event == EMIE_MOUSE_MOVED && + event.MouseInput.ButtonStates == 0))) { s32 x = event.MouseInput.X; s32 y = event.MouseInput.Y; gui::IGUIElement *hovered = -- 2.25.1