Commit 066ecbd1 authored by Jon Turney's avatar Jon Turney
Browse files

hw/xwin: Move reshape code from winUpdateWindowPosition() to the map event handler



Move reshape code, which was only used when handling a map event, from
winUpdateWindowPosition(), to put it explicitly in the map event handler.

Remove 'reshape' parameter from winUpdatePosition().

(Note that there's no handling of the ShapeNotify event to notice when the
window shape changes, instead we hook the screen SetShape procedure and reshape
the native window then)
Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: default avatarColin Harrison <colin.harrison@virgin.net>
parent 852d1fb0
......@@ -186,7 +186,7 @@ static void
winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle);
void
winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle);
winUpdateWindowPosition(HWND hWnd, HWND * zstyle);
/*
* Local globals
......@@ -742,8 +742,19 @@ winMultiWindowWMProc(void *pArg)
winApplyHints(pWMInfo->pDisplay, pNode->msg.iWindow,
pNode->msg.hwndWindow, &zstyle);
winUpdateWindowPosition(pNode->msg.hwndWindow, TRUE, &zstyle);
winUpdateWindowPosition(pNode->msg.hwndWindow, &zstyle);
}
/* Reshape */
{
WindowPtr pWin =
GetProp(pNode->msg.hwndWindow, WIN_WINDOW_PROP);
if (pWin) {
winReshapeMultiWindow(pWin);
winUpdateRgnMultiWindow(pWin);
}
}
break;
case WM_WM_UNMAP:
......@@ -1749,7 +1760,7 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle)
}
void
winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle)
winUpdateWindowPosition(HWND hWnd, HWND * zstyle)
{
int iX, iY, iWidth, iHeight;
int iDx, iDy;
......@@ -1800,8 +1811,4 @@ winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle)
SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, 0);
if (reshape) {
winReshapeMultiWindow(pWin);
winUpdateRgnMultiWindow(pWin);
}
}
......@@ -42,7 +42,7 @@
#include "winmsg.h"
#include "inputstr.h"
extern void winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle);
extern void winUpdateWindowPosition(HWND hWnd, HWND * zstyle);
/*
* Local globals
......@@ -891,7 +891,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
& ~WS_CAPTION & ~WS_SIZEBOX);
winUpdateWindowPosition(hwnd, FALSE, &zstyle);
winUpdateWindowPosition(hwnd, &zstyle);
{
WinXWMHints hints;
......
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