mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-24 04:02:09 +00:00
SNI: Fix icon reloading for raw pixmaps
This commit is contained in:
parent
3147ff21d8
commit
05993b8210
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue