aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-13 14:46:44 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-13 14:46:44 -0400
commit9ed4bbcbd73ccbfa45fd047448c564c1ff67f252 (patch)
tree09132bab2b6a9ad2964e2d4c8f32986d378f7a56
parentd7915fabc33f45e6365c13c41f6641f0dfeb0f33 (diff)
downloadrunes-9ed4bbcbd73ccbfa45fd047448c564c1ff67f252.tar.gz
runes-9ed4bbcbd73ccbfa45fd047448c564c1ff67f252.zip
only collapse flush events for a single window
-rw-r--r--src/window-xlib.c14
1 files changed, 9 insertions, 5 deletions
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(