GDK_NO_EXPOSE




While thinking about recent changes to GDK:

The GDK_NO_EXPOSE was recently added GTK. To the best of my
knowledge, NoExpose events are pretty useless without real
GraphicsExpose events. (Right now GraphicsExpose events are
converted into regular GDK_EXPOSE events). 

The reason for this is that a call to XCopyArea (with a GC with
graphics exposures on) is guaranteed to produce either:

 A sequence of GraphicsExpose events terminating in one with
   count==0

or,

 A NoExpose event.

So unless you can track GraphicsExpose events, you better not
wait for a NoExpose event. 

In conclusion, anybody who is using NoExpose events should make
sure that they don't need GraphicsExpose events as well. (That
should be pretty easy to add)

Actually, the "approved" way of doing scrolling in GTK currently
hides these events from the application. (See the scrolling example
in testgtk.) But since that way isn't all that great, it is
probably not a problem if a third-party widget uses the direct X way
of dealing with things.

However, after 1.0, I think we will add Raph's idea for handling
such things, so if you are using GraphicsExpose events, you
should consider that type of thing "marked with a red flag"

As for the VISIBILITY_NOTIFY event which was added at the
same time - I'm curious as to what it is used for. (I guess
I'll have to take a look at the HTML widget to find out)

Regards,
                                        Owen



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