From 9ed4bbcbd73ccbfa45fd047448c564c1ff67f252 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 13 May 2016 14:46:44 -0400 Subject: only collapse flush events for a single window --- src/window-xlib.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/window-xlib.c b/src/window-xlib.c index 6989890..a715309 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -455,19 +455,23 @@ static Bool runes_window_wants_event(Display *dpy, XEvent *event, XPointer arg) } static Bool runes_window_find_flush_events( - Display *dpy, XEvent *e, XPointer arg) + Display *dpy, XEvent *event, XPointer arg) { RunesWindow *w = (RunesWindow *)arg; + Window event_window = ((XAnyEvent*)event)->window; + Atom a = event->xclient.data.l[0]; UNUSED(dpy); - if (e->type == ClientMessage) { - Atom a = e->xclient.data.l[0]; - return a == w->wb->atoms[RUNES_ATOM_RUNES_FLUSH] ? True : False; + if (event_window != w->w && event_window != w->border_w) { + return False; } - else { + + if (event->type != ClientMessage) { return False; } + + return a == w->wb->atoms[RUNES_ATOM_RUNES_FLUSH]; } static void runes_window_resize_window( -- cgit v1.2.3-54-g00ecf