diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2019-06-24 12:13:01 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2019-06-24 12:13:01 +0100 |
commit | 9cde3553d63cca220553250d4cff0f6570514789 (patch) | |
tree | eb003b700f9102a0125c12f02ad7ec62698b69f3 /hw/xwin/winmultiwindowwndproc.c | |
parent | e3c5faf77564bf9ed61a35baef505f0a25dacb25 (diff) | |
parent | ff469e09b9ad904848c401db1396c0a40c89df5d (diff) |
Merge branch 'cygwin-patches-for-1.20' into cygwin-release-1.20xserver-cygwin-1.20.5-2
Diffstat (limited to 'hw/xwin/winmultiwindowwndproc.c')
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index ee3d1637e..c79792984 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -981,12 +981,16 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Branch on if the window was killed in X already */ if (pWinPriv && !pWinPriv->fXKilled) { - ErrorF("winTopLevelWindowProc - WM_DESTROY - WM_WM_KILL\n"); - - /* Tell our Window Manager thread to kill the window */ - wmMsg.msg = WM_WM_KILL; - if (fWMMsgInitialized) - winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); + /* Unowned i.e. at the top of a TRANSIENT_FOR hierarchy */ + HWND owner = GetWindow(hwnd, GW_OWNER); + if (!owner) { + ErrorF("winTopLevelWindowProc - WM_DESTROY - WM_WM_KILL\n"); + + /* Tell our Window Manager thread to kill the window */ + wmMsg.msg = WM_WM_KILL; + if (fWMMsgInitialized) + winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); + } } RemoveProp(hwnd, WIN_WINDOW_PROP); |