GTK2 + SDL2 (partial fail)

2012-12-13 Thread Gabriele Greco
I've a SDL that on linux uses a gtk2 file chooser, I've just migrated it to SDL2 and I'm finding a strange problem connected with the initialization order of the two libraries: SDL_Init -> gtk_init -> OK gtk_init -> SDL_Init -> CRASH Here is a simple program that trigger this behaviour: #includ

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread Osmo Antero
Hello, Audio-recorder has couple of examples of g_timeout_add*() functions. Ref: https://launchpad.net/audio-recorder 1) Look for: $ grep -Ri g_timeout src/*.c 2) src/rec-manager.c uses also a GAsyncQueue. See: static GAsyncQueue *g_cmd_queue = NULL; g_cmd_queue = g_async_queue_new(); 3) s

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread Mateusz Marzantowicz
On 13.12.2012 14:27, Perdie Perduta wrote: > In C++ I create an object in the call back and that in it's > constructor registers itself to do lengthy processing during gtk idle > events using: > > gint iTag = gtk_idle_add( GtkFunction fIdleActivity, gpointer pMyObject ); > > On completion, in the

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread Perdie Perduta
In C++ I create an object in the call back and that in it's constructor registers itself to do lengthy processing during gtk idle events using: gint iTag = gtk_idle_add( GtkFunction fIdleActivity, gpointer pMyObject ); On completion, in the destructor it unregisters itself with: void gtk_idle_

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread jcupitt
On 13 December 2012 11:21, Mateusz Marzantowicz wrote: > I'm writing very simple application in Python using pygobject. I'm using > > What I've observed is that GUI (menu to be specific) freezes till my > callback function finishes. It's completely unacceptable for GUI This is because callbacks a

GUI freezes waiting for callback function to return

2012-12-13 Thread Mateusz Marzantowicz
Hello, I'm writing very simple application in Python using pygobject. I'm using Gtk.Application, Gtk.ApplicationWindow and XML menu definition which is parsed by Gtk.Builder(). I'm also using Gio.SimpleAction to call method when user clicks on menu item. What I've observed is that GUI (menu to be