Re: [gtk-list] Bugs in refresh code ?




Robert Roebling <roebling@ruf.uni-freiburg.de> writes:

> Hi all,
> 
> I think I found two bugs in the refresh code
> of the GTK. When I want to redraw only a part
> of a window (in my case a GtkScrolledWindow)
> I use the gtk_widget_draw() function, which
> takes a rectangle as its second parameter.
> The rectangle is supposed to indicate the
> area which has to be redrawn.

A ScrolledWindow is just a Viewport and one or two Scrollbars.
The Viewport in turn has a window whose visible area
depends on the position of the scrollbars - so you're
making things hard for yourself by trying to figure out
what portion to give to gtk_widget_draw for the
ScrolledWindow. You can't do it properly without diving
into the internals of the widgets.

There may be bugs in propagating gtk_widget_draw() into
a ScrolledWindow - that code isn't really used anywhere.
But do yourself a favor, and put a DrawingArea into
the viewport and do your drawing there. It will
be a lot easier.

Regards,
                                 Owen



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