瀏覽代碼

Don't send relative motion while in a modal loop

This fixes queuing up a bunch of relative motion events while moving or resizing a window.
Sam Lantinga 3 周之前
父節點
當前提交
2e61b41652
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/windows/SDL_windowsevents.c

+ 1 - 1
src/video/windows/SDL_windowsevents.c

@@ -624,7 +624,7 @@ static void WIN_HandleRawMouseInput(Uint64 timestamp, SDL_VideoData *data, HANDL
 
     SDL_WindowData *windowdata = window->internal;
 
-    if (haveMotion) {
+    if (haveMotion && !windowdata->in_modal_loop) {
         if (!isAbsolute) {
             SDL_SendMouseMotion(timestamp, window, mouseID, true, (float)dx, (float)dy);
         } else {