X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframerender.c;h=737dfe950bb00d2661f1c16eb92e3ab714451fba;hb=2b2beddc7447197d12fcbcae96772e1f38eef138;hp=44a6b78412ef17d9657765cbb653da748a00b24b;hpb=5cf61ee02354c1c9f80c11f3796afc4b948055d6;p=chaz%2Fopenbox diff --git a/openbox/framerender.c b/openbox/framerender.c index 44a6b784..737dfe95 100644 --- a/openbox/framerender.c +++ b/openbox/framerender.c @@ -14,22 +14,21 @@ static void framerender_close(Frame *self, Appearance *a); void framerender_frame(Frame *self) { - if (client_focused(self->client)) { + if (self->focused) XSetWindowBorder(ob_display, self->plate, theme_cb_focused_color->pixel); - } else { + else XSetWindowBorder(ob_display, self->plate, theme_cb_unfocused_color->pixel); - } if (self->client->decorations & Decor_Titlebar) { Appearance *t, *l, *m, *n, *i, *d, *s, *c; - t = (client_focused(self->client) ? + t = (self->focused ? self->a_focused_title : self->a_unfocused_title); - l = (client_focused(self->client) ? + l = (self->focused ? self->a_focused_label : self->a_unfocused_label); - m = (client_focused(self->client) ? + m = (self->focused ? (self->client->max_vert || self->client->max_horz ? theme_a_focused_pressed_set_max : (self->max_press ? @@ -40,14 +39,14 @@ void framerender_frame(Frame *self) theme_a_unfocused_pressed_max : theme_a_unfocused_unpressed_max))); n = self->a_icon; - i = (client_focused(self->client) ? + i = (self->focused ? (self->iconify_press ? theme_a_focused_pressed_iconify : theme_a_focused_unpressed_iconify) : (self->iconify_press ? theme_a_unfocused_pressed_iconify : theme_a_unfocused_unpressed_iconify)); - d = (client_focused(self->client) ? + d = (self->focused ? (self->client->desktop == DESKTOP_ALL ? theme_a_focused_pressed_set_desk : (self->desk_press ? @@ -58,7 +57,7 @@ void framerender_frame(Frame *self) (self->desk_press ? theme_a_unfocused_pressed_desk : theme_a_unfocused_unpressed_desk))); - s = (client_focused(self->client) ? + s = (self->focused ? (self->client->shaded ? theme_a_focused_pressed_set_shade : (self->shade_press ? @@ -69,7 +68,7 @@ void framerender_frame(Frame *self) (self->shade_press ? theme_a_unfocused_pressed_shade : theme_a_unfocused_unpressed_shade))); - c = (client_focused(self->client) ? + c = (self->focused ? (self->close_press ? theme_a_focused_pressed_close : theme_a_focused_unpressed_close) : @@ -90,7 +89,7 @@ void framerender_frame(Frame *self) n->surface.data.planar.parent = t; n->surface.data.planar.parentx = self->icon_x; - n->surface.data.planar.parenty = theme_bevel + 1; + n->surface.data.planar.parenty = theme_bevel; i->surface.data.planar.parent = t; i->surface.data.planar.parentx = self->iconify_x; @@ -120,9 +119,9 @@ void framerender_frame(Frame *self) if (self->client->decorations & Decor_Handle) { Appearance *h, *g; - h = (client_focused(self->client) ? + h = (self->focused ? self->a_focused_handle : self->a_unfocused_handle); - g = (client_focused(self->client) ? + g = (self->focused ? theme_a_focused_grip : theme_a_unfocused_grip); if (g->surface.data.planar.grad == Background_ParentRelative) { @@ -162,13 +161,13 @@ static void framerender_icon(Frame *self, Appearance *a) if (self->client->nicons) { Icon *icon = client_icon(self->client, - theme_button_size, theme_button_size); + theme_button_size + 2, theme_button_size + 2); a->texture[0].type = RGBA; a->texture[0].data.rgba.width = icon->width; a->texture[0].data.rgba.height = icon->height; a->texture[0].data.rgba.data = icon->data; RECT_SET(self->a_icon->texture[0].position, 0, 0, - theme_button_size,theme_button_size); + theme_button_size + 2, theme_button_size + 2); } else a->texture[0].type = NoTexture; @@ -219,30 +218,3 @@ static void framerender_close(Frame *self, Appearance *a) theme_button_size, theme_button_size); paint(self->close, a); } - -void framerender_popup_label(Window win, Size *sz, char *text) -{ - Appearance *a; - - a = theme_app_hilite_label; - a->texture[0].data.text.string = text; - RECT_SET(a->area, 0, 0, sz->width, sz->height); - a->texture[0].position = a->area; - - XSetWindowBorderWidth(ob_display, win, theme_bwidth); - XSetWindowBorder(ob_display, win, theme_b_color->pixel); - - paint(win, a); -} - -void framerender_size_popup_label(char *text, Size *sz) -{ - Appearance *a; - - a = theme_app_hilite_label; - a->texture[0].data.text.string = text; - - appearance_minsize(a, sz); - sz->width += theme_bevel * 2; - sz->height += theme_bevel * 2; -}