Re: [gtk-list] gtk_widget_queue_draw





On Wed, 18 Nov 1998, Adrian Feiguin wrote:

> 
> 
> On 18 Nov 1998, Owen Taylor wrote:
> 
> > 
> > Adrian Feiguin <adrian@ifir.ifir.edu.ar> writes:
> > 
> > > I'm working on a widget and I defined the function widget_class->draw.
> > >  In previos versions of gtk (e.g. 0.99.3) my widget ran without
> > > problems, but in gtk+-1.0.* the widget is redrawn calling this function
> > > aparentrly at random, without any logic. I can't understand this behavior
> > > and I dont know whether is a bug in gtk or I'm missing something.
> > 
> > There were some changes early last year in the order things
> > where drawn and size-allocated.
> > 
> > I'm pretty certain that the 1.0.x code doesn't call
> > ->draw "at random". If you have some particular example of
> > behavior you want explained, you might want to detail
> > exactly what you see happening.
> > 
> > (The redraw logic has also been changed a fair bit in 1.1.x,
> >  but most things that work in 1.0.x should work in 1.1.x
> >  as well)
> > 
> > Regards,
> >                                         Owen
> > 
> I'm a little "out of date", I haven't followed the changelogs. I'm sorry.
> Well, in the gtk+-1.0.0 ChangeLog file I found the following:
> 
>         * gtk/gtkwidget.c (gtk_widget_draw): When gtk_widget_draw ()
>         occurs with queued draw already in place, redraw _entire_
>         widget. (Pointed out by Tim Janik)
> 
> I think this explains my problems. But I can't understand how it
> exactly works. What does it mean "queued draw already in place"?  
>  Thanks,
> <ADRIAN>
> 

I'm sorry, I'm going to be more precise. As you probably know, the widget
I'm refering is gtksheet. It is a composite widget: it has its
window,scrollbars, and an entry. When I move the entry from one cell to
the other, what I do is the following:
      
      gtk_widget_size_allocate(sheet->sheet_entry, &entry_allocation); 
      gtk_widget_queue_draw(sheet->sheet_entry); 
      gdk_window_show(sheet->sheet_entry->window); 
      gtk_widget_grab_focus(sheet->sheet_entry); 

What happens is that SOMETIMES, the compete widget is entirelly redrawn,
and we don't want this. What I mean with "random" is that I can't
understand the logic behind this, bacause it happens sometimes, not
always, and I can't find any correlation between the events. 
 I write to you because you made the major part of the changes in
gtkwidget.c and maybe you can give me any hint.

 Thanks, and regards,
<ADRIAN>



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