Commit b0178fe5184ff38a2316eaa22f0f9c4a4cdb55af

Cacodemon345 2021-04-14T00:52:53

KMSDRM: Report correct window position to the application

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index 43547c3..31620f7 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -1280,6 +1280,9 @@ KMSDRM_CreateWindow(_THIS, SDL_Window * window)
     SDL_SetMouseFocus(window);
     SDL_SetKeyboardFocus(window);
 
+    /* Tell the app that the window has moved to top-left. */
+    SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, 0, 0);
+
     /* Allocated windata will be freed in KMSDRM_DestroyWindow,
        and KMSDRM_DestroyWindow() will be called by SDL_CreateWindow()
        if we return error on any of the previous returns of the function. */