termux-packages/x11-packages/sdl/SDL-1.2.15_src_video_x11_SD...

20 lines
728 B
Diff

diff -uNr SDL-1.2.15/src/video/x11/SDL_x11wm.c SDL-1.2.15.mod/src/video/x11/SDL_x11wm.c
--- SDL-1.2.15/src/video/x11/SDL_x11wm.c 2012-01-19 08:30:06.000000000 +0200
+++ SDL-1.2.15.mod/src/video/x11/SDL_x11wm.c 2017-11-26 00:27:08.341353693 +0200
@@ -352,13 +352,14 @@
result = XGrabPointer(SDL_Display, SDL_Window, True, 0,
GrabModeAsync, GrabModeAsync,
SDL_Window, None, CurrentTime);
- if ( result == GrabSuccess ) {
+ if ( result == GrabSuccess || result == GrabNotViewable ) {
break;
}
SDL_Delay(100);
}
if ( result != GrabSuccess ) {
/* Uh, oh, what do we do here? */ ;
+ return(SDL_GRAB_OFF);
}
/* Now grab the keyboard */
XGrabKeyboard(SDL_Display, WMwindow, True,