# HG changeset patch # User Christopher Rogers # Date 1297486086 0 # Node ID bb74eecd3d4cd6089b24e75038b897eef1aa58da # Parent 1f20fe47a72b94b7bae5d22297eab85f94c22906 Add patches from archlinux to fix problems in libsdl. diff -r 1f20fe47a72b -r bb74eecd3d4c libsdl/receipt --- a/libsdl/receipt Sat Feb 12 02:36:49 2011 +0000 +++ b/libsdl/receipt Sat Feb 12 04:48:06 2011 +0000 @@ -16,6 +16,9 @@ compile_rules() { cd $src + patch -Np1 -i ../stuff/$PACKAGE-$VERSION-joystick-crash.diff + patch -Np1 -i ../stuff/$PACKAGE-$VERSION-fix-mouse-clicking.patch + patch -Np1 -i ../stuff/$PACKAGE-$VERSION-fix-disappearing-cursor.patch ./configure \ --prefix=/usr \ --infodir=/usr/share/info \ diff -r 1f20fe47a72b -r bb74eecd3d4c libsdl/stuff/sdl-1.2.14-fix-disappearing-cursor.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libsdl/stuff/sdl-1.2.14-fix-disappearing-cursor.patch Sat Feb 12 04:48:06 2011 +0000 @@ -0,0 +1,17 @@ +Index: SDL-1.2.14/src/video/x11/SDL_x11events.c +=================================================================== +--- SDL-1.2.14.orig/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400 ++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400 +@@ -444,8 +444,10 @@ + if ( xevent.xcrossing.mode == NotifyUngrab ) + printf("Mode: NotifyUngrab\n"); + #endif +- if ( xevent.xcrossing.detail != NotifyInferior ) { +- if ( this->input_grab == SDL_GRAB_OFF ) { ++ if ( (xevent.xcrossing.mode != NotifyGrab) && ++ (xevent.xcrossing.mode != NotifyUngrab) && ++ (xevent.xcrossing.detail != NotifyInferior) ) { ++ if ( this->input_grab == SDL_GRAB_OFF ) { + posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); + } else { + posted = SDL_PrivateMouseMotion(0, 0, diff -r 1f20fe47a72b -r bb74eecd3d4c libsdl/stuff/sdl-1.2.14-fix-mouse-clicking.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libsdl/stuff/sdl-1.2.14-fix-mouse-clicking.patch Sat Feb 12 04:48:06 2011 +0000 @@ -0,0 +1,23 @@ +--- SDL-1.2.14/src/video/x11/SDL_x11events.c.orig 2010-04-08 11:57:05.003169834 -0700 ++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-08 12:33:51.690926340 -0700 +@@ -423,12 +423,15 @@ + if ( xevent.xcrossing.mode == NotifyUngrab ) + printf("Mode: NotifyUngrab\n"); + #endif +- if ( this->input_grab == SDL_GRAB_OFF ) { +- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ if ( (xevent.xcrossing.mode != NotifyGrab) && ++ (xevent.xcrossing.mode != NotifyUngrab) ) { ++ if ( this->input_grab == SDL_GRAB_OFF ) { ++ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ } ++ posted = SDL_PrivateMouseMotion(0, 0, ++ xevent.xcrossing.x, ++ xevent.xcrossing.y); + } +- posted = SDL_PrivateMouseMotion(0, 0, +- xevent.xcrossing.x, +- xevent.xcrossing.y); + } + break; + diff -r 1f20fe47a72b -r bb74eecd3d4c libsdl/stuff/sdl-1.2.14-joystick-crash.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libsdl/stuff/sdl-1.2.14-joystick-crash.diff Sat Feb 12 04:48:06 2011 +0000 @@ -0,0 +1,14 @@ +Description: Fix crash with joystick detection. +Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c +=================================================================== +--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:37:36.000000000 -0500 ++++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:38:27.000000000 -0500 +@@ -700,7 +700,7 @@ + continue; + } + if ( test_bit(i, absbit) ) { +- int values[5]; ++ int values[6]; + + if ( ioctl(fd, EVIOCGABS(i), values) < 0 ) + continue;