newbie expose event jackpot question



Gtk folks,

I'm trying to learn a little about the gtk widgets, but I've encountered
a problem that I cannot explain.  Either I don't understand the widgets,
or I'm now too insulated from the underlying X machinery to see the
problem lies there.

I have a GtkDrawingArea in a GtkViewport/ScrolledWindow in a ...  These
widgets were cobbled together with Glade, but Glade's construction code
(in C) appears sane to me. (Of course, what do I know???)

The DrawingArea (used for its GC), receives expose events in the manner
I expect EXCEPT when the widgets are resized larger (by the WM; both
Fvwm and Enlightenment produce exactly the same symptoms).

If the DrawingArea is only partially visible through the viewport, the
resizing produces FOUR expose events.  The first (and probably most
valid) is flagged send_event=TRUE and the x, y, height, and width
correspond to the new position and size.  

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?

Jim Wilson
Novice Gtk programmer




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