Re: [3/3] winex11.drv: Use the old method to delete the desktop window.
"Vincent Povirk" <vincent(a)codeweavers.com> writes:
@@ -516,6 +516,14 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) HMENU hSysMenu; POINT pt;
+ 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. */ + PostMessageW( hwnd, WM_X11DRV_DELETE_WINDOW, 0, 0 ); + return; + }
You could just as well send the WM_SYSCOMMAND directly. -- Alexandre Julliard julliard(a)winehq.org
On Fri, Dec 11, 2009 at 4:55 AM, Alexandre Julliard <julliard(a)winehq.org> wrote:
"Vincent Povirk" <vincent(a)codeweavers.com> writes:
@@ -516,6 +516,14 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) HMENU hSysMenu; POINT pt;
+ 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. */ + PostMessageW( hwnd, WM_X11DRV_DELETE_WINDOW, 0, 0 ); + return; + }
You could just as well send the WM_SYSCOMMAND directly.
Out of curiosity, when was WM_X11DRV_DELETE_WINDOW needed, and why isn't it needed here? -- Vincent Povirk
Vincent Povirk <madewokherd+8cd9(a)gmail.com> writes:
On Fri, Dec 11, 2009 at 4:55 AM, Alexandre Julliard <julliard(a)winehq.org> wrote:
"Vincent Povirk" <vincent(a)codeweavers.com> writes:
@@ -516,6 +516,14 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event ) HMENU hSysMenu; POINT pt;
+ 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. */ + PostMessageW( hwnd, WM_X11DRV_DELETE_WINDOW, 0, 0 ); + return; + }
You could just as well send the WM_SYSCOMMAND directly.
Out of curiosity, when was WM_X11DRV_DELETE_WINDOW needed, and why isn't it needed here?
It was needed because some apps didn't expect to receive a sent WM_SYSCOMMAND at that point. The desktop doesn't care. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Vincent Povirk