+ root_p = (window == RootWindowOfScreen (mi.xgwa.screen));
+
+ /* If this is the root window, don't allow ButtonPress to be selected.
+ Bad Things Happen. */
+ if (root_p)
+ event_mask &= (~(ButtonPressMask|ButtonReleaseMask));
+
+ /* If this hack wants additional events, select them. */
+ if (event_mask && ! (mi.xgwa.your_event_mask & event_mask))
+ XSelectInput (dpy, window, (mi.xgwa.your_event_mask | event_mask));