From 980cf58ac5068c9123c77e1c6d335eefe8e39010 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 10 Jul 2019 22:18:51 +0900 Subject: [PATCH] Wait for the window to be visible before mouse warping This fixes the hang during fullscreen startup on my system (the motion events weren't being generated because there was no window to see the motion). --- libs/video/targets/context_x11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/video/targets/context_x11.c b/libs/video/targets/context_x11.c index 5c23d1875..5a6556ce0 100644 --- a/libs/video/targets/context_x11.c +++ b/libs/video/targets/context_x11.c @@ -574,10 +574,11 @@ X11_CreateWindow (int width, int height) X11_WaitForEvent (ConfigureNotify); vid_context_created = true; + XRaiseWindow (x_disp, x_win); + X11_WaitForEvent (VisibilityNotify); if (vid_fullscreen->int_val) { X11_UpdateFullscreen (vid_fullscreen); } - XRaiseWindow (x_disp, x_win); } void