comparison src/video/gem/SDL_gemevents.c @ 964:d9209754ebee

Prevent redraws till internal buffers are correctly setup
author Patrice Mandin <patmandin@gmail.com>
date Sat, 06 Nov 2004 08:56:23 +0000
parents 6c87754f324c
children 54bb19455081
comparison
equal deleted inserted replaced
963:92c247cec42d 964:d9209754ebee
208 case WM_TOPPED: 208 case WM_TOPPED:
209 wind_set(message[3],WF_TOP,message[4],0,0,0); 209 wind_set(message[3],WF_TOP,message[4],0,0,0);
210 SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS); 210 SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS);
211 break; 211 break;
212 case WM_REDRAW: 212 case WM_REDRAW:
213 GEM_wind_redraw(this, message[3],&message[4]); 213 if (!GEM_lock_redraw) {
214 GEM_wind_redraw(this, message[3],&message[4]);
215 }
214 break; 216 break;
215 case WM_ICONIFY: 217 case WM_ICONIFY:
216 case WM_ALLICONIFY: 218 case WM_ALLICONIFY:
217 wind_set(message[3],WF_ICONIFY,message[4],message[5],message[6],message[7]); 219 wind_set(message[3],WF_ICONIFY,message[4],message[5],message[6],message[7]);
218 /* If we're active, make ourselves inactive */ 220 /* If we're active, make ourselves inactive */
238 GEM_refresh_name = SDL_FALSE; 240 GEM_refresh_name = SDL_FALSE;
239 } 241 }
240 break; 242 break;
241 case WM_SIZED: 243 case WM_SIZED:
242 wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]); 244 wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]);
245 wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2);
243 GEM_win_fulled = SDL_FALSE; /* Cancel maximized flag */ 246 GEM_win_fulled = SDL_FALSE; /* Cancel maximized flag */
244 wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2); 247 GEM_lock_redraw = SDL_TRUE; /* Prevent redraw till buffers resized */
245 SDL_PrivateResize(w2, h2); 248 SDL_PrivateResize(w2, h2);
246 break; 249 break;
247 case WM_FULLED: 250 case WM_FULLED:
248 { 251 {
249 short x,y,w,h; 252 short x,y,w,h;
258 h = GEM_desk_h; 261 h = GEM_desk_h;
259 GEM_win_fulled = SDL_TRUE; 262 GEM_win_fulled = SDL_TRUE;
260 } 263 }
261 wind_set (message[3], WF_CURRXYWH, x, y, w, h); 264 wind_set (message[3], WF_CURRXYWH, x, y, w, h);
262 wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2); 265 wind_get (message[3], WF_WORKXYWH, &x2, &y2, &w2, &h2);
266 GEM_lock_redraw = SDL_TRUE; /* Prevent redraw till buffers resized */
263 SDL_PrivateResize(w2, h2); 267 SDL_PrivateResize(w2, h2);
264 } 268 }
265 break; 269 break;
266 case WM_BOTTOMED: 270 case WM_BOTTOMED:
267 case WM_UNTOPPED: 271 case WM_UNTOPPED: