Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 4b6a5d1

Browse files
committed
Merge pull request #439 from adobe/jeff/fixWhiteStripeEtAl
Different Fix for White Stripe on Aero
2 parents b7bf72b + 24c4cb9 commit 4b6a5d1

File tree

3 files changed

+1
-49
lines changed

3 files changed

+1
-49
lines changed

appshell/cef_dark_aero_window.cpp

-48
Original file line numberDiff line numberDiff line change
@@ -303,50 +303,6 @@ int cef_dark_aero_window::HandleNcHitTest(LPPOINT ptHit)
303303
return HTNOWHERE;
304304
}
305305

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-
350306
// Setup the device context for drawing
351307
void cef_dark_aero_window::InitDeviceContext(HDC hdc)
352308
{
@@ -717,10 +673,6 @@ LRESULT cef_dark_aero_window::WindowProc(UINT message, WPARAM wParam, LPARAM lPa
717673
LRESULT lr = DwpCustomFrameProc(message, wParam, lParam, &callDefWindowProc);
718674

719675
switch(message) {
720-
case WM_SYSCOMMAND:
721-
if (HandleSysCommand((UINT)wParam))
722-
return 0L;
723-
break;
724676
case WM_ACTIVATE:
725677
if (mReady) {
726678
UpdateMenuBar();

appshell/cef_dark_aero_window.h

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class cef_dark_aero_window : public cef_dark_window
7575
BOOL HandleCreate();
7676
BOOL HandlePaint();
7777
BOOL HandleNcCalcSize(BOOL calcValidRects, NCCALCSIZE_PARAMS* lpncsp, LRESULT* lr);
78-
BOOL HandleSysCommand(UINT command);
7978
BOOL HandleNcMouseMove(UINT uHitTest, LPPOINT pt);
8079
BOOL HandleNcLeftButtonDown(UINT uHitTest, LPPOINT pt);
8180

appshell/cef_main_window.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ ATOM cef_main_window::RegisterWndClass()
6464
::ZeroMemory (&wcex, sizeof (wcex));
6565
wcex.cbSize = sizeof(WNDCLASSEX);
6666

67+
wcex.style = CS_HREDRAW | CS_VREDRAW;
6768
wcex.lpfnWndProc = ::DefWindowProc;
6869
wcex.hInstance = ::hInst;
6970
wcex.hIcon = ::LoadIcon(hInst, MAKEINTRESOURCE(IDI_CEFCLIENT));

0 commit comments

Comments
 (0)