summaryrefslogtreecommitdiff
path: root/libre/sdl/SDL-1.2.10-GrabNotViewable.patch
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-09-30 23:35:51 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-09-30 23:35:51 -0400
commit2d3e592da3ea7517e48f4a253d3621a4a4e2a5d9 (patch)
tree84ba56e0f5d4c60ee48800546539a0c7360e2cad /libre/sdl/SDL-1.2.10-GrabNotViewable.patch
parent77b540c3dd5583081493304a0481808cd5cb0c03 (diff)
parent272855c0b93e2c37030a145d0d502f55d6abfd00 (diff)
Merge branch 'master' of git://lukeshu.com/mirror/parabola/abslibre
Diffstat (limited to 'libre/sdl/SDL-1.2.10-GrabNotViewable.patch')
-rw-r--r--libre/sdl/SDL-1.2.10-GrabNotViewable.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/libre/sdl/SDL-1.2.10-GrabNotViewable.patch b/libre/sdl/SDL-1.2.10-GrabNotViewable.patch
new file mode 100644
index 000000000..128cf3510
--- /dev/null
+++ b/libre/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,