Dear Ken: I see, Thank you. The “WM_PROTOCOLS” is a window manager spec.
------------------ Regards, Changhui Liu
------------------ Original ------------------ From: "Ken Thomases"ken@codeweavers.com; Date: Fri, Aug 28, 2015 02:38 AM To: "Changhui LIU"liuchanghui@linuxdeepin.com; Cc: "Alexandre Julliard"julliard@winehq.org; "wine-devel"wine-devel@winehq.org; Subject: Re: How X11 server generate XClientMessageEvent ?
On Aug 27, 2015, at 10:05 AM, Changhui LIU liuchanghui@linuxdeepin.com wrote:
I'm debugging a window set focus problem on Deepin Linux(www.deepin.org), I found some hints in handle_wm_protocols function of winex11.drv. But I feel very strange, I don't find where generate the XClientMessageEvent with event.data.l[0] = x11drv_atom(WM_TAKE_FOCUS) when I git grep WM_TAKE_FOCUS in wine source directory.
How X11 server generate XClientMessageEvent with event.type = x11drv_atom(WM_PROTOCOLS) and event.data.l[0] = x11drv_atom(WM_TAKE_FOCUS) ?
Wine does not generate such messages. In general, X clients are not supposed to. The window manager generates them and Wine responds.
-Ken