aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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(