[mutter/wip/wayland-display: 56/62] MetaWindow: don't set focus to unmanaged window
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/wayland-display: 56/62] MetaWindow: don't set focus to unmanaged window
- Date: Thu, 8 Aug 2013 08:32:48 +0000 (UTC)
commit 6c5f9dcb64e13ea2b2c0a015c55acf387dd9596a
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 b545558..af05efc 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7321,6 +7321,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]