On 6/18/07, Dmitry Timoshkov dmitry@codeweavers.com wrote:
"Lei Zhang" thestig@google.com wrote:
We already send WM_MOUSEACTIVATE message on a take focus X11 event, so I don't see a point in duplicating it. On the other hand if a WM doesn't activate a window when a user clicks on window's caption (where the close button usually placed) then it's a WM bug and we can do nothing to fix it.
Are you sure a WM activates a window before sending the message to close the window in reaction to the close button click event? If so, then both Gnome and KDE would be buggy because the sample app I wrote did not receive them with either of their WMs, nor did I see the code that sends WM_MOUSEACTIVATE get called.
I know that neither KDE nor Gnome do not activate a window if a user clicks on the window caption buttons, that's their bug IMO, not Wine's one.
-- Dmitry.
Just curious, what popular WMs do active a window when users click the window caption buttons?
In the case where the WM does the right thing and activates the window. (It looks like fvwm95 is one such WM.) Handle_wm_protocols() gets called, with protocol == x11drv_atom(WM_TAKE_FOCUS). This sends a WM_MOUSEACTIVATE message, and then the application can return MA_*ANDEAT. Now what? Currently handle_wm_protocols() gets called with protocol == x11drv_atom(WM_DELETE_WINDOW) next and the application is told to close even though it asked not to be.