Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Felix Kater
On Fri, 15 Jun 2007 22:33:24 +0300 Tor Lillqvist <[EMAIL PROTECTED]> wrote: > Then your > first problem might be that you don't call gdk_threads_enter before > calling gtk_init() and gtk_main()? One more on this aspect: What happens if gtk_main is quitted and then restarted? I assume gtk_init() s

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Felix Kater
On Fri, 15 Jun 2007 22:33:24 +0300 Tor Lillqvist <[EMAIL PROTECTED]> wrote: > Are you sure that it's gdk_threads_enter itself that blocks? Yes. > Then your > first problem might be that you don't call gdk_threads_enter before > calling gtk_init() and gtk_main()? Excellent. It was in between. (I

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Jonathan Winterflood
Ok, forget that. http://developer.gnome.org/doc/API/2.0/gdk/gdk-Threads.html 4th paragraph in Description "Unfortunately the above holds with the X11 backend only. With the Win32 backend, GDK calls should not be attempted from multiple threads at all." so If you want to do multithreading on win32,

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Tor Lillqvist
Felix Kater writes: > So, my conclusion: On the contrast to linux, unter win32 there is no way > to use gdk_threads_enter() to synchronize between different threads. Are you sure that it's gdk_threads_enter itself that blocks? Then your first problem might be that you don't call gdk_threads_ente

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Jonathan Winterflood
I too am rather intrigued by this problem... I found this: http://research.operationaldynamics.com/blogs/andrew/software/gnome-desktop/gtk-thread-awareness.html and I'm wondering: is your gtk_main() surrounded by gdk_threads_enter/leave. I imagine this missing would break in linux too, but just thi

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Felix Kater
Kevin DeKorte <[EMAIL PROTECTED]> wrote: > - From my limited GTK experience I have found that g_idle_add always > seems to work better than using gtk_threads_enter/leave. Yes, the reason why idle functions work in any case is most probably because they are running in the same thread as where gtk

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Felix Kater wrote: > Could anyone please explain this behaviour: > > Imagine a simple window with 1 box and 2 buttons in it. If you press > the first button, the second is destroyed, and a newly created button > packed into the box. This *works* on li

linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Felix Kater
Could anyone please explain this behaviour: Imagine a simple window with 1 box and 2 buttons in it. If you press the first button, the second is destroyed, and a newly created button packed into the box. This *works* on linux and win32 (gtk+-2.10.13). Now, let button 1 start a thread which does