Re: _NET_WM_PING



On Tuesday 20 of May 2003 14:00, Matthias Clasen wrote:
> >  Hello,
> >
> >  any comments on the attached patch? It wasn't explicitly specified, so I
> > think it should be.
>
> It is already specified at the beginning of the section "Root Window
> Properties (and Related Messages)".

 Ah. Now it seems obvious. But when I wanted to implement it, I really didn't 
find out this. (And when submitting the patch for Qt, TT even changed the 
event mask to NoEventMask 8-O ).

> >  Another issue I have is that if I strictly interpret the 'timestamp'
> > field as
> > X server timestamp, then I have trouble identifying the ping replies
> > comming
> > back. If I send several pings at the same time, how am I supposed to find
> > out
> > which reply matches which ping, when they all have root window as the
> > window,
> > and the timestamp is the same? Currently KWin uses the window ID as the
> > "timestamp". Is that ok, or should I have the ID in data.l[2], and change
> > the
> > spec to say that the client mustn't modify anything in the event except
> > for
> > the target window when responding?
>
> 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?

-- 
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 18:33:38.000000000 +0200
@@ -1243,10 +1243,15 @@ 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 (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.
 		</para>
+                <para>
+Note: Older versions of this specification requested that the window in the event
+is changed to root window before it is sent back. In such case, the Window Manager
+should use only the timestamp to identify the ping.
+                </para>
 		<para>
 The Window Manager MAY kill the Client (using _NET_WM_PID) if it fails to
 respond to this protocol within a reasonable time.


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