Skip to content

Commit

Permalink
Merge pull request #992 from cracyc/swp
Browse files Browse the repository at this point in the history
force wm_nccalcsize in movewindow for <=win30
  • Loading branch information
otya128 authored Jun 1, 2021
2 parents 9e0ca73 + 9f0a12e commit eeb29ba
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions user/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,19 +2083,24 @@ BOOL16 WINAPI SetWindowPos16( HWND16 hwnd, HWND16 hwndInsertAfter,
{
hwnd32 = HWND_NOTOPMOST;
}
if ((flags & SWP_NOREDRAW) && (GetExpWinVer16(GetExePtr(GetCurrentTask())) < 0x30a))
if (GetExpWinVer16(GetExePtr(GetCurrentTask())) < 0x30a)
{
RECT rect;
GetWindowRect(hwnd32, &rect);
/* top-level window */
if (GetAncestor(hwnd32, GA_PARENT) == GetDesktopWindow())
{
flags &= ~SWP_NOREDRAW;
}
if (rect.left == rect.right || rect.bottom == rect.top)
if (flags & SWP_NOREDRAW)
{
flags &= ~SWP_NOREDRAW;
RECT rect;
GetWindowRect(hwnd32, &rect);
/* top-level window */
if (GetAncestor(hwnd32, GA_PARENT) == GetDesktopWindow())
{
flags &= ~SWP_NOREDRAW;
}
if (rect.left == rect.right || rect.bottom == rect.top)
{
flags &= ~SWP_NOREDRAW;
}
}
if (!(flags & SWP_NOMOVE))
flags |= SWP_FRAMECHANGED; // force WM_NCCALCSIZE
}
DWORD count;
ReleaseThunkLock(&count);
Expand Down

0 comments on commit eeb29ba

Please sign in to comment.