winex11.drv: Post a WM_SYSCOMMAND SC_CLOSE when the window manager asks to close...
authorPaul Chitescu <paulc@voip.null.ro>
Wed, 16 Jun 2010 08:06:15 +0000 (11:06 +0300)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 16 Jun 2010 10:48:51 +0000 (12:48 +0200)
dlls/winex11.drv/event.c

index 5bb1ecf0b034b7ea21cdfbab2c8426027deabbc5..64d1992ea9fbd1fdba5e6b6ac73b804be972bdf8 100644 (file)
@@ -553,11 +553,7 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
                 }
             }
 
-            /* Simulate pressing Alt+F4 */
-            keybd_event(VK_MENU, 0, 0, 0);
-            keybd_event(VK_F4, 0, 0, 0);
-            keybd_event(VK_F4, 0, KEYEVENTF_KEYUP, 0);
-            keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
+            PostMessageW( hwnd, WM_SYSCOMMAND, SC_CLOSE, 0 );
         }
     }
     else if (protocol == x11drv_atom(WM_TAKE_FOCUS))