Re: Multi-threaded UI Freezes on GDK Call



Emmanuele Bassi wrote:
On Tue, 2007-12-18 at 20:37 -0500, Michael McCann wrote:

Yes, I've already tried that, to no avail. My code basically only consists of:

gdk_screen_get_default(): Get the default screen
gdk_screen_get_root_window(): Get the root window gdk_pixbuf_get_from_drawable(): Get a pixbuf from the entire screen
gdk_pixbuf_save_to_bufferv(): Save the pixbuf to a buffer.

taking a screenshot of the root window takes a considerable amount of
time, depending on the size of the screen and the amount of windows on
it.

gnome-screenshot forks in the background to avoid blocking the UI; since
GDK cannot be called from multiple threads, forking is the only option
you have.

ciao,
 Emmanuele.

Thanks for all of the suggestions. I'll try out the fork method you mentioned.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]