Vincent Povirk : winex11.drv: Use the old method to delete the desktop window.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 09:51:10 CST 2009


Module: wine
Branch: master
Commit: 6f9533feb112bd89c2b7dd983590682fc2dd4e69
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6f9533feb112bd89c2b7dd983590682fc2dd4e69

Author: Vincent Povirk <vincent at 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.




More information about the wine-cvs mailing list