Index: /trunk/Ohana/src/kapa/event/EventLoop.c
===================================================================
--- /trunk/Ohana/src/kapa/event/EventLoop.c	(revision 3694)
+++ /trunk/Ohana/src/kapa/event/EventLoop.c	(revision 3695)
@@ -1,3 +1,5 @@
 # include "Ximage.h"
+
+# define IgnoreMask (long) (ButtonPressMask | ClientMessage | ButtonReleaseMask | KeyPressMask | PointerMotionMask)
 
 int LastEvent (Display *display, int type, XEvent *event) {
@@ -26,5 +28,5 @@
     
     if (XEventsQueued (graphic.display, QueuedAfterFlush) < 1) {
-      usleep (10000);
+      usleep (50000);
       continue;
     }
@@ -32,9 +34,20 @@
     display = graphic.display;
 
-    /* only do the last entry for these events */
-    /* this ignores the return status from these functions */
+    /* grab the last entry for these events */
     if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event);
+    if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event);
     if (LastEvent (display, Expose,          &event)) Refresh (1);
+
     if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
+
+    /* drop and ignore the following StructureNotifyMask events */
+    LastEvent (display, GravityNotify, &event);
+    LastEvent (display, ReparentNotify, &event);
+    LastEvent (display, MapNotify, &event);
+    LastEvent (display, UnmapNotify, &event);
+
+    /* remove those events we will ignore */
+    while (XCheckMaskEvent (display, IgnoreMask, &event)) continue;
+      
   }
   return (status);
Index: /trunk/Ohana/src/kapa/include/constants.h
===================================================================
--- /trunk/Ohana/src/kapa/include/constants.h	(revision 3694)
+++ /trunk/Ohana/src/kapa/include/constants.h	(revision 3695)
@@ -1,4 +1,13 @@
 /* hardwired values for some window parameters */
-# define EVENT_MASK (long) (ButtonPressMask | ClientMessage | ButtonReleaseMask | KeyPressMask | ExposureMask | StructureNotifyMask | PointerMotionMask)
+
+# define EVENT_MASK (long) \
+(ButtonPressMask \
+ | ClientMessage \
+ | ButtonReleaseMask \
+ | KeyPressMask \
+ | ExposureMask \
+ | StructureNotifyMask \
+ | PointerMotionMask)
+
 # define DEFAULT_CURSOR XC_crosshair
 # define BORDER_WIDTH 2
@@ -18,2 +27,20 @@
 enum {SCALE, NOSCALE, RAW};
 
+/* EVENT_MASK consists of:
+
+ExposureMask        : Expose
+StructureNotifyMask : CirculateNotify | 
+                      ConfigureNotify | 
+                      DestroyNotify   | 
+		      GravityNotify   | 
+		      MapNotify       |
+		      ReparentNotify  |
+		      UnmapNotify
+ButtonPressMask     : ButtonPress
+ButtonReleaseMask   : ButtonRelease
+KeyPressMask        : KeyPress
+PointerMotionMask   : MotionNotify
+(always)            : ClientMessage 
+(always)            : MappingNotify
+
+*/
Index: /trunk/Ohana/src/kii/event/EventLoop.c
===================================================================
--- /trunk/Ohana/src/kii/event/EventLoop.c	(revision 3694)
+++ /trunk/Ohana/src/kii/event/EventLoop.c	(revision 3695)
@@ -1,3 +1,5 @@
 # include "Ximage.h"
+
+# define IgnoreMask (long) (ClientMessage | ButtonReleaseMask)
 
 int LastEvent (Display *display, int type, XEvent *event) {
@@ -33,12 +35,22 @@
     display = graphic[0].display;
 
-    /* only do the last entry for these events */
-    /* this ignores the return status from these functions */
+    /* grab the last entry for these events */
     if (LastEvent (display, ConfigureNotify, &event)) Reconfig (graphic, layout, &event);
+    if (LastEvent (display, CirculateNotify, &event)) Reconfig (graphic, layout, &event);
     if (LastEvent (display, Expose,          &event)) Refresh (graphic, layout, 1);
-    if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
     if (LastEvent (display, MotionNotify,    &event)) UpdatePointer (graphic, layout, (XMotionEvent *) &event);
     if (LastEvent (display, ButtonPress,     &event)) InterpretPresses (graphic, layout, (XButtonEvent *) &event);
     if (LastEvent (display, KeyPress,        &event)) InterpretKeys (graphic, layout, &event);
+
+    if (LastEvent (display, MappingNotify,   &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event);
+
+    /* drop and ignore the following StructureNotifyMask events */
+    LastEvent (display, GravityNotify, &event);
+    LastEvent (display, ReparentNotify, &event);
+    LastEvent (display, MapNotify, &event);
+    LastEvent (display, UnmapNotify, &event);
+
+    /* remove those events we will ignore */
+    while (XCheckMaskEvent (display, IgnoreMask, &event)) continue;
   }
   return (status);
Index: /trunk/Ohana/src/kii/include/constants.h
===================================================================
--- /trunk/Ohana/src/kii/include/constants.h	(revision 3694)
+++ /trunk/Ohana/src/kii/include/constants.h	(revision 3695)
@@ -14,5 +14,4 @@
 */
 
-# define EVENT_MASK (long) (ButtonPressMask | ClientMessage | ButtonReleaseMask | KeyPressMask | ExposureMask | StructureNotifyMask | PointerMotionMask)
 # define DEFAULT_CURSOR XC_crosshair
 # define BORDER_WIDTH 2
@@ -26,2 +25,30 @@
 int DECIMAL_DEG;
 int DEBUG;
+
+# define EVENT_MASK (long) \
+(ButtonPressMask \
+ | ClientMessage \
+ | ButtonReleaseMask \
+ | KeyPressMask \
+ | ExposureMask \
+ | StructureNotifyMask \
+ | PointerMotionMask)
+
+/* EVENT_MASK consists of:
+
+ExposureMask        : Expose
+StructureNotifyMask : CirculateNotify | 
+                      ConfigureNotify | 
+                      DestroyNotify   | 
+		      GravityNotify   | 
+		      MapNotify       |
+		      ReparentNotify  |
+		      UnmapNotify
+ButtonPressMask     : ButtonPress
+ButtonReleaseMask   : ButtonRelease
+KeyPressMask        : KeyPress
+PointerMotionMask   : MotionNotify
+(always)            : ClientMessage 
+(always)            : MappingNotify
+
+*/
