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/kii/event/EventLoop.c

    r2892 r3695  
    11# include "Ximage.h"
     2
     3# define IgnoreMask (long) (ClientMessage | ButtonReleaseMask)
    24
    35int LastEvent (Display *display, int type, XEvent *event) {
     
    3335    display = graphic[0].display;
    3436
    35     /* only do the last entry for these events */
    36     /* this ignores the return status from these functions */
     37    /* grab the last entry for these events */
    3738    if (LastEvent (display, ConfigureNotify, &event)) Reconfig (graphic, layout, &event);
     39    if (LastEvent (display, CirculateNotify, &event)) Reconfig (graphic, layout, &event);
    3840    if (LastEvent (display, Expose,          &event)) Refresh (graphic, layout, 1);
    39     if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
    4041    if (LastEvent (display, MotionNotify,    &event)) UpdatePointer (graphic, layout, (XMotionEvent *) &event);
    4142    if (LastEvent (display, ButtonPress,     &event)) InterpretPresses (graphic, layout, (XButtonEvent *) &event);
    4243    if (LastEvent (display, KeyPress,        &event)) InterpretKeys (graphic, layout, &event);
     44
     45    if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
     46
     47    /* drop and ignore the following StructureNotifyMask events */
     48    LastEvent (display, GravityNotify, &event);
     49    LastEvent (display, ReparentNotify, &event);
     50    LastEvent (display, MapNotify, &event);
     51    LastEvent (display, UnmapNotify, &event);
     52
     53    /* remove those events we will ignore */
     54    while (XCheckMaskEvent (display, IgnoreMask, &event)) continue;
    4355  }
    4456  return (status);
Note: See TracChangeset for help on using the changeset viewer.