X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframerender.c;h=bf71d2c34a937097f59557a6f320a49196839aa0;hb=e6fea245756b59f83dc0f51d13feee9cf093a1a1;hp=0b2363cd1811e195f06da0cda495a8c4ac3f15e2;hpb=e2ddfaf9fff1fb9dd6ebdc1a95f2b228d6baedb2;p=chaz%2Fopenbox diff --git a/openbox/framerender.c b/openbox/framerender.c index 0b2363cd..bf71d2c3 100644 --- a/openbox/framerender.c +++ b/openbox/framerender.c @@ -124,10 +124,8 @@ void framerender_frame(ObFrame *self) if (self->decorations & OB_FRAME_DECOR_TITLEBAR) { RrAppearance *t, *l, *m, *n, *i, *d, *s, *c, *clear; if (self->focused) { - - t = self->a_focused_title; - l = self->a_focused_label; - + t = ob_rr_theme->a_focused_title; + l = ob_rr_theme->a_focused_label; m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? ob_rr_theme->a_disabled_focused_max : (self->client->max_vert || self->client->max_horz ? @@ -141,7 +139,7 @@ void framerender_frame(ObFrame *self) (self->max_hover ? ob_rr_theme->a_hover_focused_max : ob_rr_theme->a_focused_unpressed_max)))); - n = self->a_icon; + n = ob_rr_theme->a_icon; i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? ob_rr_theme->a_disabled_focused_iconify : (self->iconify_press ? @@ -183,8 +181,8 @@ void framerender_frame(ObFrame *self) ob_rr_theme->a_hover_focused_close : ob_rr_theme->a_focused_unpressed_close))); } else { - t = self->a_unfocused_title; - l = self->a_unfocused_label; + t = ob_rr_theme->a_unfocused_title; + l = ob_rr_theme->a_unfocused_label; m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? ob_rr_theme->a_disabled_unfocused_max : (self->client->max_vert || self->client->max_horz ? @@ -198,7 +196,7 @@ void framerender_frame(ObFrame *self) (self->max_hover ? ob_rr_theme->a_hover_unfocused_max : ob_rr_theme->a_unfocused_unpressed_max)))); - n = self->a_icon; + n = ob_rr_theme->a_icon; i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? ob_rr_theme->a_disabled_unfocused_iconify : (self->iconify_press ? @@ -318,7 +316,7 @@ void framerender_frame(ObFrame *self) RrAppearance *h, *g; h = (self->focused ? - self->a_focused_handle : self->a_unfocused_handle); + ob_rr_theme->a_focused_handle : ob_rr_theme->a_unfocused_handle); RrPaint(h, self->handle, self->width, ob_rr_theme->handle_height); @@ -356,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);