[mutter] window: Make sure not to respond to input events on OR windows



commit 53425fa721b4eab7d55ddbe108b9e44cce278272
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jun 2 15:37:43 2014 -0400

    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 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 7ae3dad..df4b924 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]