Re: "draw" event fired forever
- From: onetmt <onetmt gmail com>
- To: "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: "draw" event fired forever
- Date: Mon, 04 Nov 2013 16:43:02 +0100
Il 04/11/2013 16:27, Jasper St. Pierre ha scritto:
gdk_window_set_background_rgba will queue a redraw on its own. Either
set the background once when you create the GdkWindow, or paint the
background manually with cairo.
Thank you very much; it just worked.
On Mon, Nov 4, 2013 at 10:15 AM, onetmt <onetmt gmail com
<mailto:onetmt gmail com>> wrote:
Il 04/11/2013 15:24, Jasper St. Pierre ha scritto:
> Hm. This shouldn't be happening. What version of GTK+3 are you using,
> and can you produce a small reproducible example[0] ?
>
> [0] http://sscce.org/
>
Please, find the attached example. I can get what I think is the right
behaviour by commenting the call to the drawing function in
on_daCairo_draw() callback, but when I have any cairo_ action, the
result is an infinite firing.
Release I'm currently using is 3.8.4 (Debian testing current version).
>
> On Mon, Nov 4, 2013 at 9:18 AM, onetmt <onetmt gmail com
<mailto:onetmt gmail com>
> <mailto:onetmt gmail com <mailto:onetmt gmail com>>> wrote:
>
> Il 04/11/2013 15:06, Jasper St. Pierre ha scritto:
> > Connect to the "draw" signal on the widget to do your
drawing, and
> call
> > gtk_widget_queue_redraw(); on the widget if you want to
request a
> redraw.
> >
> This is what I'm currently doing (I've connected to "draw"
signal of a
> GtkDrawingArea), but the problem is that I have the "draw"
event fired
> continuosly.
>
>
> >
> > On Mon, Nov 4, 2013 at 9:02 AM, onetmt <onetmt gmail com
<mailto:onetmt gmail com>
> <mailto:onetmt gmail com <mailto:onetmt gmail com>>
> > <mailto:onetmt gmail com <mailto:onetmt gmail com>
<mailto:onetmt gmail com <mailto:onetmt gmail com>>>> wrote:
> >
> > I'm currently in the process of porting to gtk+-3 an old
finite
> > difference calculation application; this application had a
> custom graph
> > drawing routine based on gdk_ subsystem that cannot be
> compiled anymore
> > against new gtk3 api :( . I succesfully converted every gdk_
> invocation
> > in their cairo_ counterparts, but now I have to
substitute the
> no longer
> > available "expose-event" with the new "draw" event. The
> problem is that
> > it runs continuosly in an infinite loop.
> >
> > What is the expected mechanism of this new event? How can I
> refresh the
> > graph in a clean way as in old expose-event?
> >
> > TIA
> >
> > --
> > Jasper
>
>
> --
> Jasper
--
Jasper
--
Hofstadter's Law:
"It always takes longer than you expect, even when you take into account
Hofstadter's Law."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]