X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframerender.c;h=4720d763ed4d78ff4b0f534140711b553e8a2ed2;hb=4c7cc1cfa64bf5722f059eae0528d510c2ae636f;hp=e4db2a06e6734812a8cfbcc60c0e038490a4bf80;hpb=512d93afcc3e7dd5caa42cdb69508964c6338f3d;p=chaz%2Fopenbox diff --git a/openbox/framerender.c b/openbox/framerender.c index e4db2a06..4720d763 100644 --- a/openbox/framerender.c +++ b/openbox/framerender.c @@ -354,21 +354,21 @@ static void framerender_label(ObFrame *self, RrAppearance *a) static void framerender_icon(ObFrame *self, RrAppearance *a) { - const ObClientIcon *icon; + RrImage *icon; if (!self->icon_on) return; - icon = client_icon(self->client, - ob_rr_theme->button_size + 2, - ob_rr_theme->button_size + 2); + icon = client_icon(self->client); + if (icon) { - a->texture[0].type = RR_TEXTURE_RGBA; - a->texture[0].data.rgba.width = icon->width; - a->texture[0].data.rgba.height = icon->height; - a->texture[0].data.rgba.alpha = 0xff; - a->texture[0].data.rgba.data = icon->data; - } else + RrAppearanceClearTextures(a); + a->texture[0].type = RR_TEXTURE_IMAGE; + a->texture[0].data.image.alpha = 0xff; + a->texture[0].data.image.image = icon; + } else { + RrAppearanceClearTextures(a); a->texture[0].type = RR_TEXTURE_NONE; + } RrPaint(a, self->icon, ob_rr_theme->button_size + 2, ob_rr_theme->button_size + 2);