libsdl-1.2.15-resizing.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Description: Revert change that breaks window corner resizing
  2. http://bugzilla.libsdl.org/show_bug.cgi?id=1430
  3. Author: Andrew Caudwell <acaudwell@gmail.com>
  4. Last-Update: 2012-04-10
  5. Bug-Debian: http://bugs.debian.org/665779
  6. diff -r c787fb1b5699 src/video/x11/SDL_x11events.c
  7. --- a/src/video/x11/SDL_x11events.c Mon Feb 20 23:51:08 2012 -0500
  8. +++ b/src/video/x11/SDL_x11events.c Mon Mar 26 12:26:52 2012 +1300
  9. @@ -57,12 +57,6 @@
  10. static SDLKey MISC_keymap[256];
  11. SDLKey X11_TranslateKeycode(Display *display, KeyCode kc);
  12. -/*
  13. - Pending resize target for ConfigureNotify (so outdated events don't
  14. - cause inappropriate resize events)
  15. -*/
  16. -int X11_PendingConfigureNotifyWidth = -1;
  17. -int X11_PendingConfigureNotifyHeight = -1;
  18. #ifdef X_HAVE_UTF8_STRING
  19. Uint32 Utf8ToUcs4(const Uint8 *utf8)
  20. @@ -825,16 +819,6 @@
  21. #ifdef DEBUG_XEVENTS
  22. printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
  23. #endif
  24. - if ((X11_PendingConfigureNotifyWidth != -1) &&
  25. - (X11_PendingConfigureNotifyHeight != -1)) {
  26. - if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
  27. - (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
  28. - /* Event is from before the resize, so ignore. */
  29. - break;
  30. - }
  31. - X11_PendingConfigureNotifyWidth = -1;
  32. - X11_PendingConfigureNotifyHeight = -1;
  33. - }
  34. if ( SDL_VideoSurface ) {
  35. if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
  36. (xevent.xconfigure.height != SDL_VideoSurface->h)) {
  37. diff -r c787fb1b5699 src/video/x11/SDL_x11events_c.h
  38. --- a/src/video/x11/SDL_x11events_c.h Mon Feb 20 23:51:08 2012 -0500
  39. +++ b/src/video/x11/SDL_x11events_c.h Mon Mar 26 12:26:52 2012 +1300
  40. @@ -27,8 +27,3 @@
  41. extern void X11_InitOSKeymap(_THIS);
  42. extern void X11_PumpEvents(_THIS);
  43. extern void X11_SetKeyboardState(Display *display, const char *key_vec);
  44. -
  45. -/* Variables to be exported */
  46. -extern int X11_PendingConfigureNotifyWidth;
  47. -extern int X11_PendingConfigureNotifyHeight;
  48. -
  49. diff -r c787fb1b5699 src/video/x11/SDL_x11video.c
  50. --- a/src/video/x11/SDL_x11video.c Mon Feb 20 23:51:08 2012 -0500
  51. +++ b/src/video/x11/SDL_x11video.c Mon Mar 26 12:26:52 2012 +1300
  52. @@ -1182,8 +1182,6 @@
  53. current = NULL;
  54. goto done;
  55. }
  56. - X11_PendingConfigureNotifyWidth = width;
  57. - X11_PendingConfigureNotifyHeight = height;
  58. } else {
  59. if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) {
  60. current = NULL;