Re: BUG: gtksheet row/column title expose events

Scott Dattalo <[email protected]> Thu, 09 Jun 2005 13:45:38 -0700
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
Adrian E. Feiguin wrote:
> Hi Scott, I appreciate the report, but what would really help is if you 
> could send me a short program that reproduces the problem, maybe 
> tweaking testgtksheet. I don't understand exactly what you are 
> describing, what happens exactly? the child widgets are not updated? 
> what widgets? whose in the title buttons? the labels?

I verified that testgtksheet exhibits a similar behavior. Specifically, 
if you hover the cursor above the row or column title buttons, you'll 
see the cursor flicker. In addition, the CPU usage shoots up to 100%. 
According to the unix utility 'top', 70% is spent in X, and 30% in 
testgtksheet.

Do you see this with gtk-2.6.7 ?


The manifestation in gpsim is that GTK events are effectively blocked. 
The reason is two-fold. gpsim uses the following code to catch up on gtk 
events:

   while(gtk_events_pending())
     gtk_main_iteration();

Now, if there is an event always in the queue, you'll never break out of 
the loop. And since gtk_sheet has a persistently pending expose event, 
gpsim hangs when this loop is encountered.

As far as the child widgets, I thought I was clear in the earlier 
message. The row and column titles in a gtk_sheet are gtk_buttons with 
labels (or something similar I presume). These are child widgets of the 
gtk_container class.  You can see in the second trace dump where 
gtk_sheet_expose there are a chain of calls down to gtk_child_expose. 
You can also see the line number that made the call was 4756 in gtksheet.c.

BTW, I can not duplicate this behavior with either gtk-2.2.x or 
gtk-2.4.x . In fact, I didn't know the problem existed until several 
gpsim users reported it.

Scott


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20