sn-item.c: Always set an available icon, regardless of visibility state
requested by an app. The icon and visibility state aren't necessarily set
at the same time.
Reproduced with kdeconnect.
Michael Webster
3 years ago
392 | 392 | { |
393 | 393 | surface = new_props->attention_icon_surface; |
394 | 394 | } |
395 | else | |
396 | if (new_props->icon_surface) | |
397 | { | |
398 | surface = new_props->icon_surface; | |
399 | } | |
395 | 400 | } |
396 | 401 | |
397 | 402 | if (surface != NULL) |
520 | 525 | { |
521 | 526 | const gchar *name_to_use = NULL; |
522 | 527 | |
523 | if (item->status == STATUS_ACTIVE) | |
528 | // Set an icon here, even if we're passive (hidden) - eventually only the | |
529 | // status property might change, but we wouldn't have an icon then (unless | |
530 | // the app sets the icon at the same time). | |
531 | if (item->status == STATUS_ACTIVE || item->status == STATUS_PASSIVE) | |
524 | 532 | { |
525 | 533 | if (new_props->icon_name) |
526 | 534 | { |
725 | 733 | { |
726 | 734 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
727 | 735 | { |
728 | g_critical ("Could get propertyies for %s: %s\n", | |
736 | g_critical ("Could not get properties for %s: %s\n", | |
729 | 737 | g_dbus_proxy_get_name (item->sn_item_proxy), |
730 | 738 | error->message); |
731 | 739 | } |