@@ -177,8 +177,6 @@ HWND _al_win_create_window(ALLEGRO_DISPLAY *display, int width, int height, int
177
177
NULL ,NULL ,window_class .hInstance ,0 );
178
178
al_free (window_title );
179
179
180
- clear_window (my_window , width , height );
181
-
182
180
if (_al_win_register_touch_window )
183
181
_al_win_register_touch_window (my_window , 0 );
184
182
@@ -205,6 +203,8 @@ HWND _al_win_create_window(ALLEGRO_DISPLAY *display, int width, int height, int
205
203
206
204
ShowWindow (my_window , SW_SHOW );
207
205
206
+ clear_window (my_window , width , height );
207
+
208
208
if (!(flags & ALLEGRO_RESIZABLE ) && !(flags & ALLEGRO_FULLSCREEN )) {
209
209
/* Make the window non-resizable */
210
210
HMENU menu ;
@@ -245,8 +245,6 @@ HWND _al_win_create_faux_fullscreen_window(LPCTSTR devname, ALLEGRO_DISPLAY *dis
245
245
NULL ,NULL ,window_class .hInstance ,0 );
246
246
al_free (window_title );
247
247
248
- clear_window (my_window , width , height );
249
-
250
248
if (_al_win_register_touch_window )
251
249
_al_win_register_touch_window (my_window , 0 );
252
250
@@ -271,6 +269,8 @@ HWND _al_win_create_faux_fullscreen_window(LPCTSTR devname, ALLEGRO_DISPLAY *dis
271
269
272
270
ChangeDisplaySettingsEx (devname , & mode , NULL , 0 , NULL /*CDS_FULLSCREEN*/ );
273
271
272
+ clear_window (my_window , width , height );
273
+
274
274
return my_window ;
275
275
}
276
276
@@ -1236,9 +1236,13 @@ bool _al_win_set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
1236
1236
win_display -> window , HWND_TOP , pos_x - bw /2 , pos_y - bh /2 , 0 , 0 , SWP_NOSIZE
1237
1237
);
1238
1238
}
1239
+
1239
1240
// Show the window again
1240
1241
SetWindowPos (win_display -> window , 0 , 0 , 0 , 0 , 0 , SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOZORDER | SWP_NOMOVE );
1241
1242
1243
+ // Clear the window to black
1244
+ clear_window (win_display -> window , display -> w , display -> h );
1245
+
1242
1246
ASSERT (!!(display -> flags & ALLEGRO_FULLSCREEN_WINDOW ) == onoff );
1243
1247
return true;
1244
1248
case ALLEGRO_MAXIMIZED :
0 commit comments