Re: Pixbuf->get_from_drawable in Xvfb ccontext?
- From: Scott Sneddon <scott sneddon gmail com>
- To: Torsten Schoenfeld <kaffeetisch gmx de>
- Cc: gtk-perl-list gnome org
- Subject: Re: Pixbuf->get_from_drawable in Xvfb ccontext?
- Date: Wed, 31 Dec 2008 12:49:03 -0500
That did it.
I suspected as much (but would never have known of Glib::Idle as a
solution).
Thanks,
Scott
On Dec 31, 2008, at 11:50 AM, Torsten Schoenfeld wrote:
Scott Sneddon wrote:
Do I need to call snapshot in the event loop in order to get the
screen to
render? and if so, what event should I look for to guarantee that
the event
is triggered in the Xvfb environment (no mouseclicks).
You are calling snapshot() before the main loop had a chance to do any
work. You can use an idle callback to take the snapshot when gtk+
has finished
drawing all widgets:
Glib::Idle->add (sub { snapshot(); return Glib::SOURCE_REMOVE; });
However, even with this there is still a race condition regarding
the window
manager borders: the window manager might not have drawn the borders
yet when
the callback is triggered. But apparently you don't use a window
manager, so
maybe this is irrelevant in your case.
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]