diff options
Diffstat (limited to 'src/platform/gui')
| -rw-r--r-- | src/platform/gui/sdl/Window.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/gui/sdl/Window.cpp b/src/platform/gui/sdl/Window.cpp index d301efa9..8146a8d0 100644 --- a/src/platform/gui/sdl/Window.cpp +++ b/src/platform/gui/sdl/Window.cpp @@ -365,6 +365,8 @@ std::optional<SDL_WindowID> GetEventWindowId(const SDL_Event& event) { case SDL_EVENT_WINDOW_MOUSE_LEAVE: case SDL_EVENT_WINDOW_DESTROYED: return event.window.windowID; + case SDL_EVENT_MOUSE_MOTION: + return event.motion.windowID; case SDL_EVENT_MOUSE_BUTTON_DOWN: case SDL_EVENT_MOUSE_BUTTON_UP: return event.button.windowID; @@ -448,6 +450,10 @@ bool SdlWindow::HandleEvent(const SDL_Event* event) { sdl_window_id_ = 0; return true; } + case SDL_EVENT_MOUSE_MOTION: { + MouseMoveEvent_.Raise({event->motion.x, event->motion.y}); + return true; + } case SDL_EVENT_MOUSE_BUTTON_DOWN: { MouseDownEvent_.Raise(ConvertMouseButtonEvent(event->button)); return true; |
