[mutter/wip/wayland-display: 84/93] 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: 84/93] MetaWindow: don't set focus to unmanaged window
- Date: Mon, 12 Aug 2013 18:09:13 +0000 (UTC)
commit 70bcd5f79f29a4386edd84ee27e4dc177c81fbeb
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 e065989..eb64e91 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -7388,6 +7388,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]