Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Update
xapps
gtkstatusicon-fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtkstatusicon-fix.patch of Package xapps
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);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor