prioritize UnmapEvent-s

This commit is contained in:
Julien Danjou 2008-02-01 10:52:08 +01:00
parent 4ad1f8a54a
commit cbf85c1902
1 changed files with 12 additions and 3 deletions

View File

@ -402,9 +402,18 @@ main(int argc, char *argv[])
{ {
while(XPending(dpy)) while(XPending(dpy))
{ {
XNextEvent(dpy, &ev); /* Unmap are prio otherwise we risk to SetInputFocus on unmapped
if(handler[ev.type]) * windows */
handler[ev.type](&ev); /* call handler */ while(XCheckMaskEvent(dpy, UnmapNotify, &ev))
if(handler[ev.type])
handler[ev.type](&ev);
if(XPending(dpy))
{
XNextEvent(dpy, &ev);
if(handler[ev.type])
handler[ev.type](&ev);
}
/* drop events requested to */ /* drop events requested to */
if(globalconf.drop_events) if(globalconf.drop_events)