Module: wine Branch: master Commit: 6f9533feb112bd89c2b7dd983590682fc2dd4e69 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f9533feb112bd89c2b7dd9835...
Author: Vincent Povirk vincent@codeweavers.com Date: Fri Dec 11 11:47:59 2009 -0600
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.