SDL: wayland: Send mouse coordinates after warping

From 8c54961de02d8f62ed155925cb334efcaa2d1f95 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Fri, 26 Dec 2025 16:41:23 -0500
Subject: [PATCH] wayland: Send mouse coordinates after warping

Currently, no compositor that supports the warp protocol sends a motion event after doing so, so SDL must synthesize one when using the warp protocol, as it did with the locking protocol.

This can be avoided once
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/340 is completed.
---
 src/video/wayland/SDL_waylandmouse.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c
index 1801924897ef5..8b89886e1f33e 100644
--- a/src/video/wayland/SDL_waylandmouse.c
+++ b/src/video/wayland/SDL_waylandmouse.c
@@ -1238,12 +1238,12 @@ void Wayland_SeatWarpMouse(SDL_WaylandSeat *seat, SDL_WindowData *window, float
             if (update_grabs) {
                 Wayland_SeatUpdatePointerGrab(seat);
             }
-
-            /* NOTE: There is a pending warp event under discussion that should replace this when available.
-             * https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/340
-             */
-            SDL_SendMouseMotion(0, window->sdlwindow, seat->pointer.sdl_id, false, x, y);
         }
+
+        /* NOTE: There is a pending warp event under discussion that should replace this when available.
+         * https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/340
+         */
+        SDL_SendMouseMotion(0, window->sdlwindow, seat->pointer.sdl_id, false, x, y);
     }
 }