Synchronizing _NET_WM_STATE writes and reads

Lubos Lunak l.lunak at suse.cz
Fri Nov 9 02:35:08 PST 2007


On Friday 09 of November 2007, Matthias Käppler wrote:
> Hi Peter,
>
> 2007/11/9, Peter Hutterer <mailinglists at who-t.net>:
> > bit hazy on this, but AFAIK the process is something like this:
> >
> > client changes property
> > WM is notified
> > WM applies changes
> > WM changes property
> > client is notified

 Correct.

> >
> > note that the actual changes and setting the properties are two
> > completely different and disconnected things. if you query the property
> > in between, then you get your results.
> > try waiting for the PropertyNotify event and then querying.
> >
> > btw. XSync is useless here, it only applies to _your_ connection with
> > the X server, and thus doesn't affect the WM at all.
>
> so in other words, there is no direct way to synchronize these two calls?

 Correct.

> What if the client triggers a state change and some other client wants to
> retrieve information about that window shortly thereafter?

 It will retrieve the currently valid information.

> I need pull semantics where clients are able to retrieve the currently
> active states instead of pub/sub semantics.

 They are retrieving the currently active states. Until the window manager 
processes the request and decides to apply it no change has taken place (BTW, 
I'd like to stress words request and decides, the WM may choose to simply 
ignore you).

 It's similar like when paying with a credit card in a shop. They may not 
accept payments by your credit card, and even if they do, you haven't paid 
anything by the time you've handed out the credit card.

> There must be a way to do this?

 About the same way like synchronizing credit card payments.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz



More information about the xorg mailing list