mirror of https://github.com/libsdl-org/SDL.git
Fixed secondary screens on KMSDRM (#10535)
* Removed window movement to left top corner that breaks secondary screens on KMSDRM
(cherry picked from commit ce98550cbb)
This commit is contained in:
parent
155c3bb0a3
commit
586a2dc721
|
|
@ -1589,7 +1589,11 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window)
|
||||||
SDL_SetKeyboardFocus(window);
|
SDL_SetKeyboardFocus(window);
|
||||||
|
|
||||||
/* Tell the app that the window has moved to top-left. */
|
/* Tell the app that the window has moved to top-left. */
|
||||||
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, 0, 0);
|
{
|
||||||
|
SDL_Rect display_bounds;
|
||||||
|
SDL_GetDisplayBounds(SDL_GetDisplayForWindow(window), &display_bounds);
|
||||||
|
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MOVED, display_bounds.x, display_bounds.y);
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocated windata will be freed in KMSDRM_DestroyWindow,
|
/* Allocated windata will be freed in KMSDRM_DestroyWindow,
|
||||||
and KMSDRM_DestroyWindow() will be called by SDL_CreateWindow()
|
and KMSDRM_DestroyWindow() will be called by SDL_CreateWindow()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue