Fix crash on fast status icon remapping

This commit is contained in:
Florian Müllner 2017-09-21 14:40:07 +02:00
parent 7b9e37a7c7
commit bcb2aab974
2 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From b39b84c683e29086b999b835c09ac4ee5a960852 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Thu, 14 Sep 2017 14:46:13 -0400
Subject: [PATCH] gtk-embed: ensure we only listen for window-created events
once
If a tray icon gets a mapped and unmapped and the mapped again
in quick succession, we can end up with multiple handlers
listening for window creation events.
This commit tries to guard against that by only listening for
window-created events when we don't know the actor associated
with the icon.
https://bugzilla.gnome.org/show_bug.cgi?id=787361
---
src/shell-gtk-embed.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/shell-gtk-embed.c b/src/shell-gtk-embed.c
index 176b41320..54061046b 100644
--- a/src/shell-gtk-embed.c
+++ b/src/shell-gtk-embed.c
@@ -124,13 +124,14 @@ shell_gtk_embed_on_window_mapped (GtkWidget *object,
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
MetaDisplay *display = shell_global_get_display (shell_global_get ());
- /* Listen for new windows so we can detect when Mutter has
- created a MutterWindow for this window */
- priv->window_created_handler =
- g_signal_connect (display,
- "window-created",
- G_CALLBACK (shell_gtk_embed_window_created_cb),
- embed);
+ if (priv->window_created_handler == 0 && priv->window_actor == NULL)
+ /* Listen for new windows so we can detect when Mutter has
+ created a MutterWindow for this window */
+ priv->window_created_handler =
+ g_signal_connect (display,
+ "window-created",
+ G_CALLBACK (shell_gtk_embed_window_created_cb),
+ embed);
}
static void
--
2.13.5

View File

@ -1,6 +1,6 @@
Name: gnome-shell
Version: 3.26.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Window management and application launching for GNOME
Group: User Interface/Desktops
@ -13,6 +13,8 @@ Source0: http://download.gnome.org/sources/gnome-shell/3.26/%{name}-%{ver
# Replace Epiphany with Firefox in the default favourite apps list
Patch1: gnome-shell-favourite-apps-firefox.patch
Patch2: 0001-gtk-embed-ensure-we-only-listen-for-window-created-e.patch
%define gnome_bluetooth_version 1:3.9.0
%define gobject_introspection_version 1.45.4
%define gjs_version 1.47.0
@ -115,6 +117,7 @@ easy to use experience.
%prep
%setup -q
%patch1 -p1 -b .firefox
%patch2 -p1
%build
%meson
@ -180,6 +183,9 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &> /dev/null
%{_mandir}/man1/%{name}.1.gz
%changelog
* Thu Sep 21 2017 Florian Müllner <fmuellner@redhat.com> - 3.26.0-2
- Fix crash on fast status icon remapping
* Tue Sep 12 2017 Florian Müllner <fmuellner@redhat.com> - 3.26.0-1
- Update to 3.26.0