Detecting whether a compositing manager is running

Philip Van Hoof spam at pvanhoof.be
Fri Sep 16 12:31:48 EEST 2005


On Fri, 2005-09-16 at 09:59 +0200, Christian Neumair wrote:

> It can be useful for applications and desktop environments to detect
> whether an application manager is running, for instance to decide
> whether it should use the rgba visual. According to Matthias Clasen,
> there are no means to detect this as of writing [1]. Maybe we should
> have a per-Screen flag which returns whether a compositing manager is
> running for that particular Screen.
> Opinions?

Take a look at the CLIPBOARD_MANAGER atom which has historically been
used to make it possible to detect whether a clipboard manager is
running.

Perhaps simply introduce a COMPOSITING_MANAGER atom exactly like the
CLIPBOARD_MANAGER atom?

GdkAtom manager = gdk_atom_intern("COMPOSITING_MANAGER", FALSE);
guint32 server_time = gdk_x11_get_server_time ( ... );

/* Wait for COMPOSITING_MANAGER to become available */
while (XGetSelectionOwner(gdk_display, 
	gdk_x11_atom_to_xatom (manager))!=None)
{
	sleep (2);
}

gtk_selection_owner_set ( ... , manager, server_time);




-- 
Philip Van Hoof, software developer at x-tend
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
http://www.pvanhoof.be - http://www.x-tend.be




More information about the xdg mailing list