Detecting whether the X server VT is the active one

Adam Jackson ajax at nwnk.net
Wed Mar 5 10:50:48 PST 2014


On Thu, 2014-02-27 at 16:01 +0100, Michael Thayer wrote:
> Hello,
> 
> Another problem that I am running into is that the X11 client part of 
> our Guest Additions needs to know whether or not the X server VT is 
> currently the active one, for example so that it can disable our 
> "seamless windows" functionality if the server is switched out. 
> Currently we do this too with a hack in our DDX.  This only needs to 
> work with a standard X.Org server, so I thought about adding code to the 
> server to add and update a root window property to pass on the 
> information.  Does that sound like an acceptable solution, and if not, 
> does anyone have a better one?

I think that sounds reasonable.  There's already cases of people getting
confused about things like XGetImage not working when VT switched away.
If we're going to preserve that behaviour - which I do wish would
eventually be optional - it's reasonable to give clients a way to know
that it's happening in-band with the rest of X.  (Consulting systemd or
consolekit or whatever isn't generally useful, since if the client is on
another machine there's no way it could talk to the appropriate daemon.)

- ajax



More information about the xorg-devel mailing list