Firefox/Unix/XPCOM: Fetching all open X11-Window Titles

"pit" <[email protected]> 23 May 2005 05:24:23 -0700
Newsgroups gmane.comp.mozilla.devel.unix
Organization http://groups.google.com
Message-ID <[email protected]>
Hi,

i have a C++ XPCOM Component that I use to find out
if some external application has it's main window open by querying the
X11
Window Tree using XQueryTree() and XFetchName().

Using Xlib calls directly from within the XPCOM C++ Method
implementation yields regular crashes of Firefox. (unexpected async
reply)

I now tried to make the Xlib calls asynchronuously in the GTK+ main
loop
using g_idle_add() and thread locking. This seems to work much better
but still
randomly crashes Firefox with errors from the Xlib. (also 'unexpected
async
reply')

Does anyone know of a sound solution to query the window title of all
open windows (in X11 windows, not XUL Windows) without confusing X
or crashing Firefox?

TIA,

 / pit