try grab an icon even when there are none
This commit is contained in:
parent
f6ba1f27b9
commit
dee3d68c22
1 changed files with 6 additions and 4 deletions
|
@ -235,12 +235,14 @@ static void framerender_label(ObFrame *self, RrAppearance *a)
|
||||||
|
|
||||||
static void framerender_icon(ObFrame *self, RrAppearance *a)
|
static void framerender_icon(ObFrame *self, RrAppearance *a)
|
||||||
{
|
{
|
||||||
|
const ObClientIcon *icon;
|
||||||
|
|
||||||
if (self->icon_x < 0) return;
|
if (self->icon_x < 0) return;
|
||||||
|
|
||||||
if (self->client->nicons) {
|
icon = client_icon(self->client,
|
||||||
const ObClientIcon *icon = client_icon(self->client,
|
|
||||||
ob_rr_theme->button_size + 2,
|
ob_rr_theme->button_size + 2,
|
||||||
ob_rr_theme->button_size + 2);
|
ob_rr_theme->button_size + 2);
|
||||||
|
if (icon) {
|
||||||
a->texture[0].type = RR_TEXTURE_RGBA;
|
a->texture[0].type = RR_TEXTURE_RGBA;
|
||||||
a->texture[0].data.rgba.width = icon->width;
|
a->texture[0].data.rgba.width = icon->width;
|
||||||
a->texture[0].data.rgba.height = icon->height;
|
a->texture[0].data.rgba.height = icon->height;
|
||||||
|
|
Loading…
Reference in a new issue