hw/xwin: Fix winUpdateWindowPosition() not to assume WS_EX_APPWINDOW style
Also improve it's debug output a bit Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
527cf13135
commit
23cd4d0174
|
@ -1743,13 +1743,11 @@ winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle)
|
||||||
/* Setup a rectangle with the X window position and size */
|
/* Setup a rectangle with the X window position and size */
|
||||||
SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight);
|
SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight);
|
||||||
|
|
||||||
#if 0
|
winDebug("winUpdateWindowPosition - drawable extent (%d, %d)-(%d, %d)\n",
|
||||||
ErrorF("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n",
|
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom);
|
||||||
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AdjustWindowRectEx(&rcNew, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE,
|
AdjustWindowRectEx(&rcNew, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE,
|
||||||
WS_EX_APPWINDOW);
|
GetWindowLongPtr(hWnd, GWL_EXSTYLE));
|
||||||
|
|
||||||
/* Don't allow window decoration to disappear off to top-left as a result of this adjustment */
|
/* Don't allow window decoration to disappear off to top-left as a result of this adjustment */
|
||||||
if (rcNew.left < GetSystemMetrics(SM_XVIRTUALSCREEN)) {
|
if (rcNew.left < GetSystemMetrics(SM_XVIRTUALSCREEN)) {
|
||||||
|
@ -1764,10 +1762,8 @@ winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle)
|
||||||
rcNew.bottom += iDy;
|
rcNew.bottom += iDy;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
winDebug("winUpdateWindowPosition - Window extent (%d, %d)-(%d, %d)\n",
|
||||||
ErrorF("winUpdateWindowPosition - (%d, %d)-(%d, %d)\n",
|
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom);
|
||||||
rcNew.left, rcNew.top, rcNew.right, rcNew.bottom);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Position the Windows window */
|
/* Position the Windows window */
|
||||||
SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top,
|
SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user