aboutsummaryrefslogtreecommitdiffstats
path: root/main/sdl/SDL-1.2.10-GrabNotViewable.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-16 06:39:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-16 06:39:11 +0000
commit18c4e00db7adc04446dadc4bb77abad4ccc871bf (patch)
tree659c4f45d5111f29264008fd4e44ac6ba189fc21 /main/sdl/SDL-1.2.10-GrabNotViewable.patch
parent281727c1ada5df77b3151c2076c583b768427712 (diff)
downloadaports-18c4e00db7adc04446dadc4bb77abad4ccc871bf.tar.bz2
aports-18c4e00db7adc04446dadc4bb77abad4ccc871bf.tar.xz
main/sdl: fix from fedora
http://bugzilla.libsdl.org/show_bug.cgi?id=1155
Diffstat (limited to 'main/sdl/SDL-1.2.10-GrabNotViewable.patch')
-rw-r--r--main/sdl/SDL-1.2.10-GrabNotViewable.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/sdl/SDL-1.2.10-GrabNotViewable.patch b/main/sdl/SDL-1.2.10-GrabNotViewable.patch
new file mode 100644
index 0000000000..128cf3510d
--- /dev/null
+++ b/main/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,