Commit da72de96 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

user32: Allow making window visible by WM_SETREDRAW message.

parent 3ece08ff
......@@ -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 );
......
......@@ -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;
......
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment