@@ -303,50 +303,6 @@ int cef_dark_aero_window::HandleNcHitTest(LPPOINT ptHit)
303
303
return HTNOWHERE;
304
304
}
305
305
306
- // WM_SYSCOMMAND handler
307
- // We need to handle SC_MAXIMIZE to avoid any border leakage
308
- BOOL cef_dark_aero_window::HandleSysCommand (UINT command)
309
- {
310
- if ((command & 0xFFF0 ) != SC_MAXIMIZE)
311
- return FALSE ;
312
-
313
- // Aero windows still get a border when maximized
314
- // The border, however, is the size of the unmaximized
315
- // window. To obviate that border we turn off drawing and
316
- // set the size of the window to zero then maximize the window
317
- // and redraw the window.
318
- //
319
- // This creates a new problem: the restored window size is now
320
- // 0 which, when actually restored, is the size returned from
321
- // the WM_GETMINMAXINFO handler. To obviate that problem we get
322
- // the window's restore size before maximizing it and reset it after.
323
-
324
- WINDOWPLACEMENT wp;
325
- ::ZeroMemory (&wp, sizeof (wp));
326
-
327
- wp.length = sizeof (WINDOWPLACEMENT);
328
- GetWindowPlacement (&wp);
329
-
330
- SetRedraw (FALSE );
331
- SetWindowPos (NULL , 0 , 0 , 0 , 0 , SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW|SWP_NOACTIVATE);
332
- DefaultWindowProc (WM_SYSCOMMAND, command, 0L );
333
- SetRedraw (TRUE );
334
-
335
- UpdateMenuBar ();
336
-
337
- wp.flags = 0 ;
338
- wp.showCmd = SW_MAXIMIZE;
339
-
340
- wp.ptMinPosition .x = -1 ;
341
- wp.ptMinPosition .y = -1 ;
342
- wp.ptMaxPosition .x = -1 ;
343
- wp.ptMaxPosition .y = -1 ;
344
-
345
- // reset the restore size
346
- SetWindowPlacement (&wp);
347
- return TRUE ;
348
- }
349
-
350
306
// Setup the device context for drawing
351
307
void cef_dark_aero_window::InitDeviceContext (HDC hdc)
352
308
{
@@ -717,10 +673,6 @@ LRESULT cef_dark_aero_window::WindowProc(UINT message, WPARAM wParam, LPARAM lPa
717
673
LRESULT lr = DwpCustomFrameProc (message, wParam, lParam, &callDefWindowProc);
718
674
719
675
switch (message) {
720
- case WM_SYSCOMMAND:
721
- if (HandleSysCommand ((UINT)wParam))
722
- return 0L ;
723
- break ;
724
676
case WM_ACTIVATE:
725
677
if (mReady ) {
726
678
UpdateMenuBar ();
0 commit comments