From 9bc5814be2eb7828077a3929fbda55f3d31eb2fe Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 11 Dec 2009 11:47:59 -0600 Subject: [PATCH] winex11.drv: Use the old method to delete the desktop window. --- dlls/winex11.drv/event.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index e8e4522..32eb64a 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -507,6 +507,14 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) if (protocol == x11drv_atom(WM_DELETE_WINDOW)) { + if (hwnd == GetDesktopWindow()) + { + /* The desktop window does not have a close button that we can + * pretend to click. Therefore, we simply send it a close command. */ + SendMessageW(hwnd, WM_SYSCOMMAND, SC_CLOSE, 0); + return; + } + /* Ignore the delete window request if the window has been disabled * and we are in managed mode. This is to disallow applications from * being closed by the window manager while in a modal state. -- 1.6.3.3