summaryrefslogtreecommitdiff
path: root/user/sdl/SDL-1.2.10-GrabNotViewable.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-09 22:43:31 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-09 22:43:31 -0500
commit1260f86b565660da72dc1519a8e559bf6698ec2f (patch)
treec3d99a3ca0ec0419d9122f08d8339ed462b89867 /user/sdl/SDL-1.2.10-GrabNotViewable.patch
parent8e4a0999462da95f45199a637dd461d04154e590 (diff)
downloadpackages-1260f86b565660da72dc1519a8e559bf6698ec2f.tar.gz
packages-1260f86b565660da72dc1519a8e559bf6698ec2f.tar.bz2
packages-1260f86b565660da72dc1519a8e559bf6698ec2f.tar.xz
packages-1260f86b565660da72dc1519a8e559bf6698ec2f.zip
user/sdl: pull in, take, fix a bit
Diffstat (limited to 'user/sdl/SDL-1.2.10-GrabNotViewable.patch')
-rw-r--r--user/sdl/SDL-1.2.10-GrabNotViewable.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/user/sdl/SDL-1.2.10-GrabNotViewable.patch b/user/sdl/SDL-1.2.10-GrabNotViewable.patch
new file mode 100644
index 000000000..128cf3510
--- /dev/null
+++ b/user/sdl/SDL-1.2.10-GrabNotViewable.patch
@@ -0,0 +1,22 @@
+Makes SDL-1.2 SDL_WM_GrabInput() non-blocking in case of SDL window is not
+viewable. Patch provided by <pbonzini@redhat.com>.
+See <http://bugzilla.libsdl.org/show_bug.cgi?id=1155>.
+
+--- ./src/video/x11/SDL_x11wm.c 2007-12-31 04:48:13.000000000 +0000
++++ ./src/video/x11/SDL_x11wm.c 2009-01-15 10:27:14.000000000 +0000
+@@ -351,13 +351,14 @@ SDL_GrabMode X11_GrabInputNoLock(_THIS,
+ 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,