diff options
author | Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at> | 2018-12-14 10:27:32 +0100 |
---|---|---|
committer | Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at> | 2018-12-14 10:27:32 +0100 |
commit | 0df60dc8e4b6d3d007eea442cda464950b187218 (patch) | |
tree | 02a51991d4960073b18559cf505364639eedd15d /plugins | |
parent | 1667a3248edd2d208131218a54005797adca6374 (diff) | |
download | xfce4-panel-0df60dc8e4b6d3d007eea442cda464950b187218.tar.gz |
Revert "tasklist: Add support for larger application icons"
Unfortunately the global icon cache of libwnck lets us run into an
"icon-changed" signal loop if a user has multiple tasklists with
different icon sizes. This was already realized in 2002, when this call
was originally removed from libwnck. It's unclear to me why it was
re-introduced without addressing this issue.
For reference:
* https://github.com/GNOME/libwnck/commit/4b216137230d2fac212b42b42acb8267e604c0a7
This reverts commit fc4efcc991b21d191f0b82412fb33070009780c5.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tasklist/tasklist-widget.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c index dd30962c..fd9476a9 100644 --- a/plugins/tasklist/tasklist-widget.c +++ b/plugins/tasklist/tasklist-widget.c @@ -2568,12 +2568,13 @@ xfce_tasklist_button_icon_changed (WnckWindow *window, return; icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (xfce_tasklist_get_panel_plugin (tasklist))); - wnck_set_default_icon_size (icon_size); context = gtk_widget_get_style_context (GTK_WIDGET (child->icon)); /* get the window icon */ - if (tasklist->show_labels - || child->type == CHILD_TYPE_GROUP_MENU) + if (tasklist->show_labels || + child->type == CHILD_TYPE_GROUP_MENU) + pixbuf = wnck_window_get_mini_icon (window); + else if (icon_size <= 31) pixbuf = wnck_window_get_mini_icon (window); else pixbuf = wnck_window_get_icon (window); @@ -3743,12 +3744,13 @@ xfce_tasklist_group_button_icon_changed (WnckClassGroup *class_group, return; icon_size = xfce_panel_plugin_get_icon_size (XFCE_PANEL_PLUGIN (xfce_tasklist_get_panel_plugin (group_child->tasklist))); - wnck_set_default_icon_size (icon_size); context = gtk_widget_get_style_context (GTK_WIDGET (group_child->icon)); /* get the class group icon */ if (group_child->tasklist->show_labels) pixbuf = wnck_class_group_get_mini_icon (class_group); + else if (icon_size <= 31) + pixbuf = wnck_class_group_get_mini_icon (class_group); else pixbuf = wnck_class_group_get_icon (class_group); @@ -3756,13 +3758,6 @@ xfce_tasklist_group_button_icon_changed (WnckClassGroup *class_group, for (li = group_child->windows; li != NULL; li = li->next) { child = li->data; - /* in case the libwnck icon_cache provided us with a 32px group icon and that's not - what we want we take the app icon of the first app in the group instead (only until - cache is invalidated of course), because we always get that at the correct size */ - if (gdk_pixbuf_get_width (pixbuf) != icon_size - && !group_child->tasklist->show_labels) - pixbuf = wnck_window_get_icon (child->window); - if (!wnck_window_is_minimized (child->window)) { all_minimized_in_group = FALSE; @@ -3791,20 +3786,6 @@ xfce_tasklist_group_button_icon_changed (WnckClassGroup *class_group, -static gboolean -xfce_tasklist_group_button_size_allocate (GtkWidget *widget, - GdkRectangle *allocation, - gpointer user_data) -{ - XfceTasklistChild *child = user_data; - /* Make sure the icons have the correct size */ - xfce_tasklist_group_button_icon_changed (child->class_group, child); - - return TRUE; -} - - - static void xfce_tasklist_group_button_remove (XfceTasklistChild *group_child) { @@ -3983,8 +3964,6 @@ xfce_tasklist_group_button_new (WnckClassGroup *class_group, /* note that the same signals should be in the proxy menu item too */ g_signal_connect (G_OBJECT (child->button), "button-press-event", G_CALLBACK (xfce_tasklist_group_button_button_press_event), child); - g_signal_connect (G_OBJECT (child->button), "size-allocate", - G_CALLBACK (xfce_tasklist_group_button_size_allocate), child); /* monitor class group changes */ g_signal_connect (G_OBJECT (class_group), "icon-changed", |