summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-01-10 14:37:45 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-01-16 16:49:15 +0000
commit066ecbd11d516ea68d7ebc7470232d01c5717546 (patch)
treee6f75ced74efd87f6ca0f88021c452e24d8c583e /hw
parent852d1fb042f4160fe023a015f1c9a34126bf911a (diff)
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 <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwin/winmultiwindowwm.c21
-rw-r--r--hw/xwin/winmultiwindowwndproc.c4
2 files changed, 16 insertions, 9 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 773fc9767..feefcf4df 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -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);
- }
}
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index c2292c661..f7c6f2be6 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -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;