From 8cb303126f2679f1a855eb630ce9ddb7c743e382 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Mon, 24 Mar 2025 19:06:05 -0400
Subject: [PATCH] wayland: Fix global mouse position retrieval
---
src/video/wayland/SDL_waylandmouse.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c
index 8075c3a2d880f..d464cf3ff9776 100644
--- a/src/video/wayland/SDL_waylandmouse.c
+++ b/src/video/wayland/SDL_waylandmouse.c
@@ -903,6 +903,7 @@ static SDL_MouseButtonFlags SDLCALL Wayland_GetGlobalMouseState(float *x, float
int off_x, off_y;
result = viddata->input->buttons_pressed;
+ SDL_GetMouseState(x, y);
SDL_RelativeToGlobalForWindow(focus, focus->x, focus->y, &off_x, &off_y);
*x += off_x;
*y += off_y;