SNI: Fix icon reloading for raw pixmaps

This commit is contained in:
scorpion-26 2024-05-02 11:22:15 +02:00
parent 3147ff21d8
commit 05993b8210

View file

@ -226,6 +226,7 @@ namespace SNI
g_variant_unref(iconNameVar);
}
}
bool gotPixbuf = false;
if (iconName != "")
{
GdkPixbuf* pixbuf = nullptr;
@ -258,11 +259,13 @@ namespace SNI
data->item.pixbuf = pixbuf;
data->item.w = gdk_pixbuf_get_width(pixbuf);
data->item.h = gdk_pixbuf_get_height(pixbuf);
gotPixbuf = true;
}
}
if (data->item.pixbuf == nullptr)
if (!gotPixbuf)
{
// IconName failed to load, try IconPixmap as a fallback
GVariant* iconPixmap = getProperty("IconPixmap");
if (iconPixmap == nullptr)
{