From b11d90c85f2cced56e4cd39e7e5074bd5c2a6151 Mon Sep 17 00:00:00 2001 From: David Quintana Date: Tue, 23 Dec 2014 01:31:36 +0000 Subject: [PATCH] [EXPLORER] * Improve an older change that I commited by mistake, with the improvbements based on a patch by Giannis. * In Windows, fixes the taskbar having a size grip with the taskbar is themed and locked. * In ReactOS, the size grip never seems to disappear, contrary to Giannis' concerns in the issue. * Because of the above, I decided to commit the changes, and let the sizing edge inconsistency be a followup to the issue. CORE-6966 #resolve #comment A modified version of the patch was commited in r65804. Thanks. svn path=/trunk/; revision=65804 --- reactos/base/shell/explorer/traywnd.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/reactos/base/shell/explorer/traywnd.cpp b/reactos/base/shell/explorer/traywnd.cpp index 702e292a52b..32df7c55c5b 100644 --- a/reactos/base/shell/explorer/traywnd.cpp +++ b/reactos/base/shell/explorer/traywnd.cpp @@ -1435,7 +1435,7 @@ ChangePos: else m_Theme = NULL; - if (m_Theme) + if (Locked && m_Theme) { SetWindowStyle(m_hWnd, WS_THICKFRAME | WS_BORDER, 0); } @@ -1443,6 +1443,7 @@ ChangePos: { SetWindowStyle(m_hWnd, WS_THICKFRAME | WS_BORDER, WS_THICKFRAME | WS_BORDER); } + SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); return TRUE; } @@ -1787,9 +1788,8 @@ ChangePos: BOOL STDMETHODCALLTYPE Lock(IN BOOL bLock) { - BOOL bPrevLock; + BOOL bPrevLock = Locked; - bPrevLock = Locked; if (Locked != bLock) { Locked = bLock; @@ -1800,8 +1800,20 @@ ChangePos: { /* Reset?? */ Locked = bPrevLock; + return bPrevLock; } } + + if (Locked && m_Theme) + { + SetWindowStyle(m_hWnd, WS_THICKFRAME | WS_BORDER, 0); + } + else + { + SetWindowStyle(m_hWnd, WS_THICKFRAME | WS_BORDER, WS_THICKFRAME | WS_BORDER); + } + SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); + } return bPrevLock;