summaryrefslogtreecommitdiff
path: root/src/PeekIfEv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/PeekIfEv.c')
-rw-r--r--src/PeekIfEv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/PeekIfEv.c b/src/PeekIfEv.c
index 207cd119..c4e8af0d 100644
--- a/src/PeekIfEv.c
+++ b/src/PeekIfEv.c
@@ -50,6 +50,7 @@ XPeekIfEvent (
unsigned long qe_serial = 0;
LockDisplay(dpy);
+ dpy->in_ifevent = True;
prev = NULL;
while (1) {
for (qelt = prev ? prev->next : dpy->head;
@@ -63,6 +64,7 @@ XPeekIfEvent (
_XStoreEventCookie(dpy, &copy);
*event = copy;
}
+ dpy->in_ifevent = False;
UnlockDisplay(dpy);
return 0;
}