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



commit 50112b5e91615097967ddcfd57d98ec4dd793d77
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 b90cb89..4127ff4 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7329,6 +7329,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]