src/video/gem/SDL_gemevents.c
changeset 964 d9209754ebee
parent 928 6c87754f324c
child 996 54bb19455081
--- a/src/video/gem/SDL_gemevents.c	Sun Oct 31 13:15:33 2004 +0000
+++ b/src/video/gem/SDL_gemevents.c	Sat Nov 06 08:56:23 2004 +0000
@@ -210,7 +210,9 @@
 			SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS);
 			break;
 		case WM_REDRAW:
-			GEM_wind_redraw(this, message[3],&message[4]);
+			if (!GEM_lock_redraw) {
+				GEM_wind_redraw(this, message[3],&message[4]);
+			}
 			break;
 		case WM_ICONIFY:
 		case WM_ALLICONIFY:
@@ -240,8 +242,9 @@
 			break;
 		case WM_SIZED:
 			wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]);
+			wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2);
 			GEM_win_fulled = SDL_FALSE;		/* Cancel maximized flag */
-			wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2);
+			GEM_lock_redraw = SDL_TRUE;		/* Prevent redraw till buffers resized */
 			SDL_PrivateResize(w2, h2);
 			break;
 		case WM_FULLED:
@@ -260,6 +263,7 @@
 				}
 				wind_set (message[3], WF_CURRXYWH, x, y, w, h);
 				wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2);
+				GEM_lock_redraw = SDL_TRUE;		/* Prevent redraw till buffers resized */
 				SDL_PrivateResize(w2, h2);
 			}
 			break;