Re: newbie expose event jackpot question



Meegan and Jim Wilson <wilson@afn.org> writes: 
> The next three (flagged  send_event=FALSE) are a redundant subset of the
> first; They don't tesselate any rational region; they bear little
> relation to a possible artifact of an XCopyArea().
> 
> If the Viewport is resized bigger than the DrawingArea a FIFTH expose
> event describing the ORIGINALLY visibile portion of the drawing area is 
> passed to my handler.  None are adjacent in the event queue (count==0).
> 
> Can someone please explain to me what is going wrong, how to fix it, or
> how to at least to work around it?
> 

The send_event = TRUE comes from GTK itself, probably from a
gtk_widget_queue_draw(), and the other three are from X caused by
moving windows around. These three are probably caused by the
scrolled window moving the viewport, I'm not sure.

GTK 1.2 isn't that good at compressing expose events, though it can do
so in some cases, so sometimes you get redundant exposes like this. 
The next version of GTK (previously refered to as 1.4, now it looks
like we're calling it 2.0) is worlds better in this respect.

I would say just eat the inefficiency for now, if you're using a
backing pixmap then it won't be significant and you won't get flicker.

Havoc




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