From: Jacek Caban Subject: user32: Allow making window visible by WM_SETREDRAW message. Message-Id: <54F85833.9080709@codeweavers.com> Date: Thu, 05 Mar 2015 14:20:51 +0100 --- dlls/user32/win.c | 7 ++----- dlls/user32/win.h | 1 - dlls/user32/winpos.c | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 0516193..8ff3ebd 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -774,10 +774,7 @@ ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) if (ok && ((style.styleOld ^ style.styleNew) & WS_VISIBLE)) { - /* Some apps try to make their window visible through WM_SETREDRAW. - * Only do that if the window was never explicitly hidden, - * because Steam messes with WM_SETREDRAW after hiding its windows. */ - made_visible = !(win->flags & WIN_HIDDEN) && (style.styleNew & WS_VISIBLE); + made_visible = (style.styleNew & WS_VISIBLE) != 0; invalidate_dce( win, NULL ); } WIN_ReleasePtr( win ); @@ -2499,7 +2496,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B if ((offset == GWL_STYLE && ((style.styleOld ^ style.styleNew) & WS_VISIBLE)) || (offset == GWL_EXSTYLE && ((style.styleOld ^ style.styleNew) & WS_EX_LAYERED))) { - made_visible = !(wndPtr->flags & WIN_HIDDEN) && (wndPtr->dwStyle & WS_VISIBLE); + made_visible = (wndPtr->dwStyle & WS_VISIBLE) != 0; invalidate_dce( wndPtr, NULL ); } WIN_ReleasePtr( wndPtr ); diff --git a/dlls/user32/win.h b/dlls/user32/win.h index a19ebe9..a182778 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -76,7 +76,6 @@ typedef struct tagWND #define WIN_ISUNICODE 0x0010 /* Window is Unicode */ #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0020 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */ #define WIN_CHILDREN_MOVED 0x0040 /* children may have moved, ignore stored positions */ -#define WIN_HIDDEN 0x0080 /* hidden by an explicit SWP_HIDEWINDOW (as opposed to WM_SETREDRAW) */ /* Window functions */ extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 12d3ffa..f92a3dc 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1923,9 +1923,6 @@ static BOOL fixup_flags( WINDOWPOS *winpos ) parent = GetAncestor( winpos->hwnd, GA_PARENT ); if (!IsWindowVisible( parent )) winpos->flags |= SWP_NOREDRAW; - if (winpos->flags & SWP_HIDEWINDOW) wndPtr->flags |= WIN_HIDDEN; - else if (winpos->flags & SWP_SHOWWINDOW) wndPtr->flags &= ~WIN_HIDDEN; - if (wndPtr->dwStyle & WS_VISIBLE) winpos->flags &= ~SWP_SHOWWINDOW; else {