Hello community, here is the log from the commit of package xapps for openSUSE:Leap:15.2 checked in at 2020-04-12 15:38:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/xapps (Old) and /work/SRC/openSUSE:Leap:15.2/.xapps.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xapps" Sun Apr 12 15:38:22 2020 rev:13 rq:792633 version:1.6.10 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/xapps/xapps.changes 2020-03-09 18:14:34.481417404 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.xapps.new.3248/xapps.changes 2020-04-12 15:38:23.238011947 +0200 @@ -1,0 +2,6 @@ +Sun Mar 22 13:04:56 UTC 2020 - Maurizio Galli <[email protected]> + +- Add gtkstatusicon-fix.patch, backport to fix crashing tray icon + (boo#1165082) + +------------------------------------------------------------------- New: ---- gtkstatusicon-fix.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xapps.spec ++++++ --- /var/tmp/diff_new_pack.DHSIAw/_old 2020-04-12 15:38:23.550012183 +0200 +++ /var/tmp/diff_new_pack.DHSIAw/_new 2020-04-12 15:38:23.554012186 +0200 @@ -1,7 +1,7 @@ # # spec file for package xapps # -# Copyright (c) 2020 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,8 @@ Patch0: xapps-void-return-no-return.patch # PATCH-FIX-UPSTREAM xapps-python3.patch -- python2 is gone Patch1: xapps-python3.patch +# PATCH-FIX-UPSTREAM gtkstatusicon-fix.patch [email protected] -- Backport fix for icon crashing when using gtkstatus icon +Patch2: gtkstatusicon-fix.patch BuildRequires: fdupes BuildRequires: gtk-doc BuildRequires: hicolor-icon-theme ++++++ gtkstatusicon-fix.patch ++++++ diff -rub a/libxapp/xapp-status-icon.c b/libxapp/xapp-status-icon.c --- a/libxapp/xapp-status-icon.c 2020-01-10 01:14:11.000000000 +0800 +++ b/libxapp/xapp-status-icon.c 2020-03-22 20:56:42.289445192 +0800 @@ -798,7 +798,6 @@ } gtk_status_icon_set_tooltip_text (priv->gtk_status_icon, priv->tooltip_text); - gtk_status_icon_set_name (priv->gtk_status_icon, priv->name); if (priv->icon_name) { @@ -1327,6 +1326,12 @@ xapp_status_icon_set_name (XAppStatusIcon *icon, const gchar *name) { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + + if (g_strcmp0 (name, icon->priv->name) == 0) + { + return; + } + g_clear_pointer (&icon->priv->name, g_free); icon->priv->name = g_strdup (name); @@ -1337,7 +1342,14 @@ xapp_status_icon_interface_set_name (icon->priv->skeleton, name); } - update_fallback_icon (icon); + /* Call this directly instead of in the update_fallback_icon() function, + * as every time this is called, Gtk re-creates the plug for the icon, + * so the tray thinks one icon has disappeared and a new one appeared, + * which can cause flicker and undesirable re-ordering of tray items. */ + if (icon->priv->gtk_status_icon != NULL) + { + gtk_status_icon_set_name (icon->priv->gtk_status_icon, name); + } } /** @@ -1353,6 +1365,12 @@ xapp_status_icon_set_icon_name (XAppStatusIcon *icon, const gchar *icon_name) { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + + if (g_strcmp0 (icon_name, icon->priv->icon_name) == 0) + { + return; + } + g_clear_pointer (&icon->priv->icon_name, g_free); icon->priv->icon_name = g_strdup (icon_name); @@ -1379,6 +1397,12 @@ xapp_status_icon_set_tooltip_text (XAppStatusIcon *icon, const gchar *tooltip_text) { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + + if (g_strcmp0 (tooltip_text, icon->priv->tooltip_text) == 0) + { + return; + } + g_clear_pointer (&icon->priv->tooltip_text, g_free); icon->priv->tooltip_text = g_strdup (tooltip_text); @@ -1405,6 +1429,12 @@ xapp_status_icon_set_label (XAppStatusIcon *icon, const gchar *label) { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + + if (g_strcmp0 (label, icon->priv->label) == 0) + { + return; + } + g_clear_pointer (&icon->priv->label, g_free); icon->priv->label = g_strdup (label); @@ -1429,6 +1459,12 @@ xapp_status_icon_set_visible (XAppStatusIcon *icon, const gboolean visible) { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + + if (visible == icon->priv->visible) + { + return; + } + icon->priv->visible = visible; g_debug ("XAppStatusIcon set_visible: %s", visible ? "TRUE" : "FALSE"); @@ -1456,6 +1492,13 @@ { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + g_return_if_fail (GTK_IS_MENU (menu)); + + if (menu == GTK_MENU (icon->priv->primary_menu)) + { + return; + } + g_clear_object (&icon->priv->primary_menu); g_debug ("XAppStatusIcon set_primary_menu: %p", menu); @@ -1501,6 +1544,12 @@ GtkMenu *menu) { g_return_if_fail (XAPP_IS_STATUS_ICON (icon)); + g_return_if_fail (GTK_IS_MENU (menu)); + + if (menu == GTK_MENU (icon->priv->secondary_menu)) + { + return; + } g_clear_object (&icon->priv->secondary_menu);
