From 53425fa721b4eab7d55ddbe108b9e44cce278272 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 2 Jun 2014 15:37:43 -0400 Subject: [PATCH] window: Make sure not to respond to input events on OR windows This can happen since we select for events on the root window, and clients themselves might not select for input, meaning the X server will bubble up. Just do nothing and ignore the event in this case. This should hopefully fix some of the Window manager warning: Log level 8: meta_window_raise: assertion '!window->override_redirect' failed Window manager warning: Log level 8: meta_window_focus: assertion '!window->override_redirect' failed spam that people have been seeing. --- src/core/window.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index 7ae3dada9..df4b9240e 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -7784,6 +7784,15 @@ meta_window_handle_ungrabbed_event (MetaWindow *window, if (display->grab_op != META_GRAB_OP_NONE) return FALSE; + /* Some windows might not ask for input, in which case we might be here + * because we selected for ButtonPress on the root window. In that case, + * we have to take special care not to act for an override-redirect window. + * + * Consume the event in this case, though, since we don't want it passed + * to the compositor or UI. */ + if (window->override_redirect) + return TRUE; + /* We have three passive button grabs: * - on any button, without modifiers => focuses and maybe raises the window * - on resize button, with modifiers => start an interactive resizing