Re: OffscreenWindow returns empty pixbuf
- From: Phil Wolff <adiabat centurylink net>
- To: Kjell Ahlstedt <kjell ahlstedt bredband net>
- Cc: gtkmm-list gnome org
- Subject: Re: OffscreenWindow returns empty pixbuf
- Date: Wed, 03 Sep 2014 10:55:51 -0700
I saw that, but it's now clear I over-interpreted the "re" part of
"redrawn"...
Good catch!!
Phil
On 09/03/2014 07:56 AM, Kjell Ahlstedt wrote:
The documentation of OffscreenWindow says: "When contained offscreen
widgets are redrawn, OffscreenWindow will emit a "damage-event" signal."
I connected a signal handler to signal_damage_event(), like so:
m_pw.signal_damage_event().connect(
sigc::mem_fun(*this, &Test::on_offscreen_window_damage_event));
And it worked, when I called get_pixbuf() in the signal handler!
Kjell
Den 2014-09-03 15:32, Phil Wolff skrev:
Yes, I discovered that yesterday, but my end use for this cannot rely
on user intervention.
I derived my own OffscreenWindow class so I could trap events.
Following the show_all(), I see signal_realize, and I see signal_map,
but (contrary to the documentation: "The signal_map_event() signal
will be emitted when the widget's window is mapped. A window is
mapped when it becomes visible on the screen.") I never see
signal_map_event, which is the one that would tell me when to call
get_pixbuf().
???
Phil
On 09/03/2014 01:46 AM, Kjell Ahlstedt wrote:
Den 2014-09-02 01:23, Phil Wolff skrev:
Can anybody tell me why this code returns a properly sized Pixbuf
with no image data?
When Gtk::OffscreenWindow::get_pixbuf() is called in Test::Test, the
OffscreenWindow has not yet been drawn. Try my modified version of
your code. When it's started, the window is empty. If you press a
mouse button in the window, Test::on_button_press_event() is called,
and the label's text is shown.
Kjell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]