From: sfan5 Date: Sun, 15 Mar 2020 19:34:49 +0000 (+0100) Subject: Fix mouse events sent to wrong GUI elements when dragging X-Git-Tag: 5.2.0~69 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5a31d56c9f9546838b602d0226e341dd30030edf;p=oweals%2Fminetest.git Fix mouse events sent to wrong GUI elements when dragging --- 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 =