Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix mouse events sent to wrong GUI elements when dragging
  • Loading branch information
sfan5 committed Mar 16, 2020
1 parent 13ad8e2 commit 5a31d56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/guiFormSpecMenu.cpp
Expand Up @@ -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 =
Expand Down

0 comments on commit 5a31d56

Please sign in to comment.