From 58bcc69e27a210d8c1b453598c974c0a120e00ef Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 26 Jun 2010 17:14:14 +0200 Subject: [PATCH] Don't mishandle ConfigureNotify on redirect windows from before they were reparented. --- openbox/event.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openbox/event.c b/openbox/event.c index e4f99d66..190113f5 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1759,6 +1759,7 @@ static void event_handle_dock(ObDock *s, XEvent *e) static gboolean event_handle_window(ObWindow *wi, XEvent *e) { gboolean used = FALSE, pixchange = FALSE; + gboolean same_window; if (wi->type == OB_WINDOW_CLASS_PROMPT) return used; @@ -1767,9 +1768,15 @@ static gboolean event_handle_window(ObWindow *wi, XEvent *e) composite_dirty(); if (e->xconfigure.send_event) break; - if (e->xconfigure.window == window_redir(wi)) { + same_window = window_top(wi) == window_redir(wi); + + if (e->xconfigure.window == window_redir(wi) && + /* if the redir != top window, but the event came from the root, + then the redir window used to be a child of the root but is not + anymore. so don't use it for the redirect window */ + (same_window || e->xconfigure.event != obt_root(ob_screen))) + { XConfigureEvent const *xe = &e->xconfigure; - const gboolean same_window = window_top(wi) == window_redir(wi); int x, y, w, h; /* if the redir window's size changes.. */ -- 2.34.1