Initialize MinMax.ptReserved, use better defaults for child windows.
This commit is contained in:
parent
c99317a8c9
commit
dfa1f6a82a
|
@ -740,11 +740,25 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
|
||||||
INT xinc, yinc;
|
INT xinc, yinc;
|
||||||
LONG style = GetWindowLongA( hwnd, GWL_STYLE );
|
LONG style = GetWindowLongA( hwnd, GWL_STYLE );
|
||||||
LONG exstyle = GetWindowLongA( hwnd, GWL_EXSTYLE );
|
LONG exstyle = GetWindowLongA( hwnd, GWL_EXSTYLE );
|
||||||
|
RECT rc;
|
||||||
|
|
||||||
/* Compute default values */
|
/* Compute default values */
|
||||||
|
|
||||||
|
GetWindowRect(hwnd, &rc);
|
||||||
|
MinMax.ptReserved.x = rc.left;
|
||||||
|
MinMax.ptReserved.y = rc.top;
|
||||||
|
|
||||||
|
if (style & WS_CHILD)
|
||||||
|
{
|
||||||
|
GetClientRect(GetParent(hwnd), &rc);
|
||||||
|
MinMax.ptMaxSize.x = rc.right;
|
||||||
|
MinMax.ptMaxSize.y = rc.bottom;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN);
|
MinMax.ptMaxSize.x = GetSystemMetrics(SM_CXSCREEN);
|
||||||
MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN);
|
MinMax.ptMaxSize.y = GetSystemMetrics(SM_CYSCREEN);
|
||||||
|
}
|
||||||
MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
|
MinMax.ptMinTrackSize.x = GetSystemMetrics(SM_CXMINTRACK);
|
||||||
MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
|
MinMax.ptMinTrackSize.y = GetSystemMetrics(SM_CYMINTRACK);
|
||||||
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN);
|
MinMax.ptMaxTrackSize.x = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
@ -1191,6 +1205,8 @@ HDWP WINAPI BeginDeferWindowPos( INT count )
|
||||||
HDWP handle;
|
HDWP handle;
|
||||||
DWP *pDWP;
|
DWP *pDWP;
|
||||||
|
|
||||||
|
TRACE("%d\n", count);
|
||||||
|
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
@ -1207,6 +1223,8 @@ HDWP WINAPI BeginDeferWindowPos( INT count )
|
||||||
pDWP->valid = TRUE;
|
pDWP->valid = TRUE;
|
||||||
pDWP->wMagic = DWP_MAGIC;
|
pDWP->wMagic = DWP_MAGIC;
|
||||||
pDWP->hwndParent = 0;
|
pDWP->hwndParent = 0;
|
||||||
|
|
||||||
|
TRACE("returning hdwp %p\n", handle);
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1222,6 +1240,9 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
|
||||||
int i;
|
int i;
|
||||||
HDWP newhdwp = hdwp,retvalue;
|
HDWP newhdwp = hdwp,retvalue;
|
||||||
|
|
||||||
|
TRACE("hdwp %p, hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
|
||||||
|
hdwp, hwnd, hwndAfter, x, y, cx, cy, flags);
|
||||||
|
|
||||||
hwnd = WIN_GetFullHandle( hwnd );
|
hwnd = WIN_GetFullHandle( hwnd );
|
||||||
if (hwnd == GetDesktopWindow()) return 0;
|
if (hwnd == GetDesktopWindow()) return 0;
|
||||||
|
|
||||||
|
@ -1295,6 +1316,8 @@ BOOL WINAPI EndDeferWindowPos( HDWP hdwp )
|
||||||
BOOL res = TRUE;
|
BOOL res = TRUE;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
TRACE("%p\n", hdwp);
|
||||||
|
|
||||||
pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp );
|
pDWP = (DWP *) USER_HEAP_LIN_ADDR( hdwp );
|
||||||
if (!pDWP) return FALSE;
|
if (!pDWP) return FALSE;
|
||||||
for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++)
|
for (i = 0, winpos = pDWP->winPos; i < pDWP->actualCount; i++, winpos++)
|
||||||
|
|
Loading…
Reference in New Issue