Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-09-02 Thread Michael Torrie
http://irrepupavel.com/documents/gtk/gtk_threads.html ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-09-02 Thread Michael Torrie
Cristi Cobzarenco wrote: > Those are the options that I am using, but it doesn't work for me. I really > appreciate the answer, I forgot to say, however, that I'm using MinGW under > MS Windows. I now remember seeing somewhere that GTK multithreading only > works on the X11 backend, so that might b

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Cristi Cobzarenco
Those are the options that I am using, but it doesn't work for me. I really appreciate the answer, I forgot to say, however, that I'm using MinGW under MS Windows. I now remember seeing somewhere that GTK multithreading only works on the X11 backend, so that might be the problem. I will try it on m

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Jorge Opaso Pazos
OK. This works too: #include static gpointer _gtkthread(gpointer a_data) { gdk_threads_enter(); gtk_main(); gdk_threads_leave(); return NULL; } static void _create_widgets() { GtkWidget *l_win; Gtk

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Cristi Cobzarenco
Hi, Yeah, this works for me to, this is equivalent to my "create_in_gt" flag being on. Problem is if you try creating the widgets in the main thread. Does this work for you? #include static gpointer _gtkthread(gpointer a_data) { gdk_threads_enter(); gtk_main(); gdk_threads_l

Re: Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Jorge Opaso Pazos
Hello, This works for me: #include static gpointer _gtkthread(gpointer a_data) { GtkWidget *l_win; GtkWidget *l_but; gdk_threads_enter(); l_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); l_but = gtk_button_new_with_label("My Button")

Problem running the GTK main loop in a separate thread (different from the main one).

2009-08-29 Thread Cristi Cobzarenco
Hi, I've been using GTK for a pretty long time but I've never used threads with it and I'm not able to properly run the GTK main loop in a separate thread.More to the point if I create a window, for example, in a thread other than the GTK one, it becomes unresponsive. Other GTK calls (that don't cr