Re: Flickering with Socket and Plug
- Date: Sun, 24 Sep 2017 20:45:59 +0200
- From: René Hansen <rene@xxxxxxxxxxxxxxx>
- Subject: Re: Flickering with Socket and Plug
> But you seems to do the drawing completely wrong.
> Generally gtk_widget_queue_draw() is involved in the drawing process,
> that is that your timer does not do the drawing directly, but only
> invalidates the widget, which cause a indirect draw.
True, you are right. I had a look at a bunch of examples and many do it
like this. They invalidate parts or the whole widget in a timer callback
and redraw it in the on_draw function.
> You may find a few examples for this, one recent using plain C was
> contained in this thread:
I just had a look at the links. In the example it is done almost the
same like I do (if I got it right), though it must not be the "right
way". But even placing gtk_widget_queue_draw into my draw_callback
funtion does not prevent the window from flickering.
It must be someting inside the Socket and Plug of GTK, because when I
simply add the drawing_area to the window (without any socket or plug
involved) everything works fine.
gtk-list mailing list