X server not responding when querying X pointer position

Thierry Reding thierry.reding at avionic-design.de
Fri Jul 8 04:13:11 PDT 2011


* Daniel Stone wrote:
> Hi,
> 
> On Fri, Jul 08, 2011 at 12:51:19PM +0200, Thierry Reding wrote:
> > * Thierry Reding wrote:
> > > * Daniel Stone wrote:
> > > > Heh, threads are always problematic.  Are you calling XInitThreads()
> > > > before your first call to XOpenDisplay()?
> > > 
> > > Actually I was just using Gtk+, without any explicit calls to the X
> > > libraries. But grep'ing through the Gtk+ sources yields no matches for
> > > XInitThreads(). I'll try adding it manually.
> > 
> > Calling XInitThreads() explicitly does indeed seem to solve the problem. I've
> > been doing some more monkey-testing and wasn't able to reproduce this
> > particular problem.
> 
> Hurrah. :)
> 
> > Still, in my opinion this should be something for Gtk+ to take care of. Would
> > you agree that this should be filed as a bug report against Gtk+?
> 
> I think gdk_threads_init() or similar takes care of this;

I cannot find any references to XInitThreads() in the GTK/GDK sources.
gdk_threads_init() merely sets up gdk-specific locking. Are you saying the GDK
threads support should be equivalent to the Xlib one? Or is this indeed
missing in the GDK initialization?

> GTK+ and threads are fraught anyway.

Alas, this is not the first time I've run into this kind of trouble. In
retrospect it might have been better to split off the different components
instead of cramming it all into a single process. Then again, that would have
been rather awkward.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110708/217c11e3/attachment.pgp>


More information about the xorg-devel mailing list