diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2015-07-01 16:30:36 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-04-07 10:31:13 +0100 |
commit | 8114b8127f01fc81390fc13e3d09bcc50e41a66f (patch) | |
tree | e3fba376ef3ba2937b8f3c4dd688b0ed6e0b2f7d /hw/xwin/winmultiwindowwm.c | |
parent | 6a64b9d7af70dc7ff2cac8b35a1f7b0797823733 (diff) |
hw/xwin: In multiwindow mode, do window minimization entirely in the WM
Remove winMinimizeWindow(), implement as UpdateState() in the WM instead,
which uses getHwnd() to map a Window XID to a HWND (like everything else in
the WM), rather than peering into the servers internal data structures.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winmultiwindowwm.c')
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index e594794c1..80bb483cb 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -672,6 +672,25 @@ UpdateStyle(WMInfoPtr pWMInfo, Window iWindow) WS_EX_APPWINDOW) ? TRUE : FALSE); } +/* + * Updates the state of a HWND + * (only minimization supported at the moment) + */ + +static void +UpdateState(WMInfoPtr pWMInfo, Window iWindow) +{ + HWND hWnd; + + winDebug("UpdateState: iWindow 0x%08x\n", (int)iWindow); + + hWnd = getHwnd(pWMInfo, iWindow); + if (!hWnd) + return; + + ShowWindow(hWnd, SW_MINIMIZE); +} + #if 0 /* * Fix up any differences between the X11 and Win32 window stacks @@ -879,8 +898,7 @@ winMultiWindowWMProc(void *pArg) break; case WM_WM_CHANGE_STATE: - /* Minimize the window in Windows */ - winMinimizeWindow(pNode->msg.iWindow); + UpdateState(pWMInfo, pNode->msg.iWindow); break; default: |