[mutter/wip/wayland-display: 52/65] MetaWindow: don't set focus to unmanaged window



commit 63fdf8bcb83ad736ca9673217e958f20ddd46425
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Mon Jul 29 10:15:01 2013 +0200

    MetaWindow: don't set focus to unmanaged window
    
    Closing the last window causes the no-focus window to gain
    focus, which causes mutter to unfocus the just closed window,
    and that crashes. As focusing a window that is about to be
    destroyed does not make sense, avoid a crash in this case.
    
    Note: this is probably a reference counting bug in MetaWayland
    actually.

 src/core/window.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 870ce5b..6313330 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7399,6 +7399,9 @@ void
 meta_window_set_focused_internal (MetaWindow *window,
                                   gboolean    focused)
 {
+  if (window->unmanaging)
+    return;
+
   if (focused)
     {
       window->has_focus = TRUE;


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