user32: Allow making window visible by WM_SETREDRAW message.

This commit is contained in:
Jacek Caban 2015-03-05 14:20:51 +01:00 committed by Alexandre Julliard
parent 3ece08ff4d
commit da72de967b
3 changed files with 2 additions and 9 deletions

View File

@ -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 );

View File

@ -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;

View File

@ -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
{