[winGRASS] libG11

Malcolm Blue mblue at nb.sympatico.ca
Mon Oct 1 01:15:31 EDT 2001


> -----Original Message-----
> From: Glynn Clements [mailto:glynn.clements at virgin.net]

> Of the three, the least fault tolerant case is
> Get_location_with_pointer(), as this doesn't receive MotionNotify
> events. If these were erroneously added to the queue, they would
> accumulate far more rapidly than e.g. ConfigureNotify.
>
> The issue is that XCheckWindowEvent() will only remove the events
> which are actually reported.
>
> In the current version of the code, there shouldn't be any problems,
> provided that the event handling is implemented correctly.
> Specifically, any events which don't match the window's event mask
> must be discarded rather than queued.
>

Well, that's the problem then.  I only discarded the event I was looking
for. So we should flush the queue while checking.

> If this were not the case, code which only uses XNextEvent() would
> probably continue to work: XNextEvent() would report events which
> shouldn't occur, but these would typically just be ignored; the
> important point is that they would be removed from the queue.
>
> OTOH, code which only uses XCheckWindowEvent() (i.e. the event loops
> in the Get_location_with_* functions) only removes certain types of
> events; if other event types were erroneously added to the queue, they
> would accumulate.
>

Seems so.

> NB: Expose events are no longer reported, as they aren't required.
>
> > XGetImage() is used by some of the interactive routines (not too many
> > though).  Glynn had checked to see which ones used the Panel
> routines (which
> > in turn use XGetImage) and the number is fairly small.  Check his emails
> > from late last week for commands to use to test this with.  (Note that
> > d.site.labels which was on his list works, so probably only some of the
> > options need to use panels.)
>
> Panels are only used if the "-m" switch is given.
>

Thanks.


Malcolm
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




More information about the grass-windows mailing list