Re: [gtk-list] Re: XInitThreads causing problems to GTK windows.
- From: Sebastian Wilhelmi <wilhelmi ira uka de>
- To: gtk-list redhat com
- CC: Peter Wilson <peter stubble force9 co uk>
- Subject: Re: [gtk-list] Re: XInitThreads causing problems to GTK windows.
- Date: Fri, 16 Jul 1999 10:28:05 +0200
Hi, Chris ;-)
> I think you've missunderstood a little what I'm trying to achieve. The
> second thread in my program will NEVER make any GTK+ / GDK or GLIB calls, so
> g_thread_init is not needed. However, it may well be making calls directly
> to XLib at the same time as GDK calls XLib, for this reason I NEED
> XInitThreads(). The second thread in my program simply 'looks after' XLib
> events for a window that the first thread creates (by opening it's own XLib
> connection....). The second thread never changes any variables at all, so I
> don't need any mutexs at all. For the moment though I'm just calling
> XInitThreads AFTER gtk_init and hopeing that nothing bad happens (oh
> god...). Actually - it probably doesn't matter - I don't currently call any
> GTK / GDK functions while the second thread exists, but that isn't very
> forward looking!
Ok, then forget, what I said. As I do not know much about X-programming I
can't help you here. But wouldn't it be safe for you to also simply call
gdk_threads_enter() and ...leave() before the X-functions in the other thread
and not call XThreadsInit? I mean, that works (and is guaranteed to work,
because yoy are using your own locking and X doesn't need to do it then.
Bye,
Sebastian
--
Sebastian Wilhelmi | här ovanför alla molnen
mailto:wilhelmi@ira.uka.de | är himmlen så förunerligt blå
http://goethe.ira.uka.de/~wilhelmi |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]