long data[] = {state, None};
XEvent ev;
XWindowAttributes wa;
+ int putback;
DNPRINTF(SWM_D_EVENT, "set_win_state: window: %lu\n", win->id);
(unsigned char *)data, 2);
/* wait for completion of XChangeProperty */
+ putback = 0;
while (XCheckIfEvent(display, &ev, set_win_notify_cb, (char *)win))
- ;
+ putback = 1;
+ if (putback)
+ XPutBackEvent(display, &ev);
}
long
{
XEvent ev;
XWindowAttributes wa;
+ int putback;
if (win == NULL)
return;
XUnmapWindow(display, win->id);
/* make sure we wait for XUnmapWindow completion */
+ putback = 0;
while (XCheckIfEvent(display, &ev, unmap_window_cb, (char *)win))
- ;
+ putback = 1;
+ if (putback)
+ XPutBackEvent(display, &ev);
}
void