[client] x11: switch to using XInput2 for all events and warp

On platforms like KDE, mixing X core events with XInput2 events causes
issues, so just switch entirely over to XInput2.
This commit is contained in:
Geoffrey McRae
2021-01-20 04:52:27 +11:00
parent da65c47245
commit ac3333c0d2
2 changed files with 202 additions and 86 deletions

View File

@@ -1951,7 +1951,7 @@ static int lg_run(void)
params.w,
params.h,
(
SDL_WINDOW_SHOWN |
SDL_WINDOW_HIDDEN |
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
(params.maximize ? SDL_WINDOW_MAXIMIZED : 0) |
@@ -1977,6 +1977,10 @@ static int lg_run(void)
g_state.ds->init(&g_state.wminfo);
// now init has been done we can show the window, doing this before init for
// X11 causes us to miss the first focus event
SDL_ShowWindow(g_state.window);
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS,
params.minimizeOnFocusLoss ? "1" : "0");