diff --git a/src/gui/window.c b/src/gui/window.c index aa26d0ab..85e1676c 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -138,7 +138,7 @@ static void RecalcClientArea (HWND hWnd) if (pWin->secondaryDC == HDC_INVALID) { /* remove the flag of WS_EX_AUTOSECONDARYDC */ - pWin->dwExStyle = pWin->dwExStyle | WS_EX_AUTOSECONDARYDC; + pWin->dwExStyle &= ~WS_EX_AUTOSECONDARYDC; pWin->secondaryDC = 0; } diff --git a/src/kernel/desktop-comm.c b/src/kernel/desktop-comm.c index 9e742d6e..f170c761 100644 --- a/src/kernel/desktop-comm.c +++ b/src/kernel/desktop-comm.c @@ -232,7 +232,7 @@ static int dskAddNewMainWindow (PMAINWIN pWin) if (pWin->secondaryDC == HDC_INVALID) { /* remove the flag of WS_EX_AUTOSECONDARYDC */ - pWin->dwExStyle = pWin->dwExStyle | WS_EX_AUTOSECONDARYDC; + pWin->dwExStyle &= ~WS_EX_AUTOSECONDARYDC; pWin->secondaryDC = 0; }