summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <vkareh@redhat.com>2019-12-04 10:01:11 -0500
committerThomas Haller <thaller@redhat.com>2020-02-14 18:21:35 +0100
commit360ad330ed2dc4c34a40e418a2a8c642459dd4f9 (patch)
tree3de310a3efeabb6c9619d371a22de06ee156991d
parent34f69fbec5f13f12e0ebdc97d8e7c9b57a8b04c7 (diff)
downloadnetwork-manager-applet-360ad330ed2dc4c34a40e418a2a8c642459dd4f9.tar.gz
applet: fix widget assertion failure when running as indicator
Fixes: dc9ee4e1129c ('applet: scale icons for HiDPI displays') https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/74
-rw-r--r--src/applet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/applet.c b/src/applet.c
index abf0c25c..7f0883e6 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3001,7 +3001,7 @@ nma_icon_check_and_load (const char *name, NMApplet *applet)
if (g_hash_table_lookup_extended (applet->icon_cache, name, NULL, (gpointer) &icon))
return icon;
- scale = gtk_widget_get_scale_factor (applet->context_menu);
+ scale = gdk_window_get_scale_factor (gdk_get_default_root_window ());
/* Try to load the icon; if the load fails, log the problem, and set
* the icon to the fallback icon if requested.