File: fix_window_resizing.diff

package info (click to toggle)
libsdl1.2 1.2.15%2Bdfsg2-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,596 kB
  • sloc: ansic: 128,539; cpp: 11,192; sh: 9,887; asm: 2,553; objc: 2,128; makefile: 349; csh: 248; perl: 35; pascal: 8
file content (75 lines) | stat: -rw-r--r-- 2,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From: Andrew Caudwell <acaudwell@gmail.com>
Date: Sun, 10 Jul 2022 11:19:25 +0100
Subject: Revert change that breaks window corner resizing

Last-Update: 2012-04-10
Bug-Debian: http://bugs.debian.org/665779
Forwarded: http://bugzilla.libsdl.org/show_bug.cgi?id=1430
Forwarded: https://github.com/libsdl-org/SDL-1.2/issues/667
Applied-upstream: no, https://github.com/libsdl-org/SDL-1.2/commit/f10b27cc9f3e7e201080a245d1c23143e013fad2 was applied instead
---
 src/video/x11/SDL_x11events.c   | 16 ----------------
 src/video/x11/SDL_x11events_c.h |  5 -----
 src/video/x11/SDL_x11video.c    |  2 --
 3 files changed, 23 deletions(-)

diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c
index 86f6cee..514a456 100644
--- a/src/video/x11/SDL_x11events.c
+++ b/src/video/x11/SDL_x11events.c
@@ -57,12 +57,6 @@ static SDLKey ODD_keymap[256];
 static SDLKey MISC_keymap[256];
 SDLKey X11_TranslateKeycode(Display *display, KeyCode kc);
 
-/*
- Pending resize target for ConfigureNotify (so outdated events don't
- cause inappropriate resize events)
-*/
-int X11_PendingConfigureNotifyWidth = -1;
-int X11_PendingConfigureNotifyHeight = -1;
 
 #ifdef X_HAVE_UTF8_STRING
 Uint32 Utf8ToUcs4(const Uint8 *utf8)
@@ -839,16 +833,6 @@ printf("MapNotify!\n");
 #ifdef DEBUG_XEVENTS
 printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
 #endif
-		if ((X11_PendingConfigureNotifyWidth != -1) &&
-		    (X11_PendingConfigureNotifyHeight != -1)) {
-		    if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
-			(xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
-			    /* Event is from before the resize, so ignore. */
-			    break;
-		    }
-		    X11_PendingConfigureNotifyWidth = -1;
-		    X11_PendingConfigureNotifyHeight = -1;
-		}
 		if ( SDL_VideoSurface ) {
 		    if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
 		        (xevent.xconfigure.height != SDL_VideoSurface->h)) {
diff --git a/src/video/x11/SDL_x11events_c.h b/src/video/x11/SDL_x11events_c.h
index fe26d9c..1177137 100644
--- a/src/video/x11/SDL_x11events_c.h
+++ b/src/video/x11/SDL_x11events_c.h
@@ -27,8 +27,3 @@
 extern void X11_InitOSKeymap(_THIS);
 extern void X11_PumpEvents(_THIS);
 extern void X11_SetKeyboardState(Display *display, const char *key_vec);
-
-/* Variables to be exported */
-extern int X11_PendingConfigureNotifyWidth;
-extern int X11_PendingConfigureNotifyHeight;
-
diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c
index 1941ba3..7e7d1b6 100644
--- a/src/video/x11/SDL_x11video.c
+++ b/src/video/x11/SDL_x11video.c
@@ -1177,8 +1177,6 @@ SDL_Surface *X11_SetVideoMode(_THIS, SDL_Surface *current,
 			current = NULL;
 			goto done;
 		}
-		X11_PendingConfigureNotifyWidth = width;
-		X11_PendingConfigureNotifyHeight = height;
 	} else {
 		if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) {
 			current = NULL;