Re: _NET_WM_PING



On Wednesday 21 of May 2003 18:34, Lubos Lunak wrote:
> On Tuesday 20 of May 2003 14:00, Matthias Clasen wrote:
> > >  Hello,
> > >
[snip]
> >
> > It is unfortunate that the EWMH demands to change the window field in the
> > event, since that
> > is entirely unnecessary. The destination window to which the event is
> > sent is a separate XSendEvent parameter. So the most elegant solution
> > would be to say that the app should send the ping unmodified to the root
> > window. That would be a theoretically incompatible change, but I doubt
> > that wms currently do anything with the window field in received pings
> > (since it must always be root). We would have to add some advice how wms
> > should deal with pings from old clients which have the window == root.
>
>  How about the attached changes?

 Bah, wrong, forget it. If the app selects for StructureNotifyMask on the root 
window, it gets the same event back, and has no way to find out whether it's 
from the WM or from itself -> infinite loop.

 The window will have to be remembered somewhere else in the event. Attached 
is attempt #2.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l lunak suse cz , l lunak kde org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/
--- wm-spec.sgml.sav	2003-05-20 14:42:55.000000000 +0200
+++ wm-spec.sgml	2003-05-21 20:36:25.000000000 +0200
@@ -1239,13 +1239,16 @@ message_type = WM_PROTOCOLS
 format = 32
 data.l[0] = _NET_WM_PING
 data.l[1] = timestamp
+data.l[2] = the respective client window
 other data.l[] elements = 0
 ]]></programlisting>
 		<para>
 A participating Client receiving this message MUST send it back to the root
-window immediately, by setting window = root, and calling XSendEvent.  The
-Client MUST NOT alter the timestamp, as this can be used by the Window Manager
-to uniquely identify the ping.
+window immediately, by setting window = root, and calling XSendEvent with
+the same event mask like all other root window messages in this specification use.
+The Client MUST NOT alter the timestamp or any other field in the event,
+besides the window. The Window Manager can uniquely identify the ping by the timestamp
+and the data.l[2] field if necessary.
 		</para>
 		<para>
 The Window Manager MAY kill the Client (using _NET_WM_PID) if it fails to


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]