IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 11, 2005, 4:09:30 PM (21 years ago)
Author:
eugene
Message:

fix of EventLoop, which was not flushing some events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa/event/EventLoop.c

    r3465 r3695  
    11# include "Ximage.h"
     2
     3# define IgnoreMask (long) (ButtonPressMask | ClientMessage | ButtonReleaseMask | KeyPressMask | PointerMotionMask)
    24
    35int LastEvent (Display *display, int type, XEvent *event) {
     
    2628   
    2729    if (XEventsQueued (graphic.display, QueuedAfterFlush) < 1) {
    28       usleep (10000);
     30      usleep (50000);
    2931      continue;
    3032    }
     
    3234    display = graphic.display;
    3335
    34     /* only do the last entry for these events */
    35     /* this ignores the return status from these functions */
     36    /* grab the last entry for these events */
    3637    if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event);
     38    if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event);
    3739    if (LastEvent (display, Expose,          &event)) Refresh (1);
     40
    3841    if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
     42
     43    /* drop and ignore the following StructureNotifyMask events */
     44    LastEvent (display, GravityNotify, &event);
     45    LastEvent (display, ReparentNotify, &event);
     46    LastEvent (display, MapNotify, &event);
     47    LastEvent (display, UnmapNotify, &event);
     48
     49    /* remove those events we will ignore */
     50    while (XCheckMaskEvent (display, IgnoreMask, &event)) continue;
     51     
    3952  }
    4053  return (status);
Note: See TracChangeset for help on using the changeset viewer.