summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbox/frame.c17
-rw-r--r--openbox/frame.h10
-rw-r--r--openbox/framerender.c16
-rw-r--r--openbox/openbox.c1
4 files changed, 8 insertions, 36 deletions
diff --git a/openbox/frame.c b/openbox/frame.c
index a47c2f06..8fee3b69 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -216,27 +216,10 @@ static void set_theme_statics(ObFrame *self)
ob_rr_theme->paddingx + 1, ob_rr_theme->title_height);
XResizeWindow(ob_display, self->trrresize,
ob_rr_theme->paddingx + 1, ob_rr_theme->title_height);
-
- /* set up the dynamic appearances */
- self->a_unfocused_title = RrAppearanceCopy(ob_rr_theme->a_unfocused_title);
- self->a_focused_title = RrAppearanceCopy(ob_rr_theme->a_focused_title);
- self->a_unfocused_label = RrAppearanceCopy(ob_rr_theme->a_unfocused_label);
- self->a_focused_label = RrAppearanceCopy(ob_rr_theme->a_focused_label);
- self->a_unfocused_handle =
- RrAppearanceCopy(ob_rr_theme->a_unfocused_handle);
- self->a_focused_handle = RrAppearanceCopy(ob_rr_theme->a_focused_handle);
- self->a_icon = RrAppearanceCopy(ob_rr_theme->a_icon);
}
static void free_theme_statics(ObFrame *self)
{
- RrAppearanceFree(self->a_unfocused_title);
- RrAppearanceFree(self->a_focused_title);
- RrAppearanceFree(self->a_unfocused_label);
- RrAppearanceFree(self->a_focused_label);
- RrAppearanceFree(self->a_unfocused_handle);
- RrAppearanceFree(self->a_focused_handle);
- RrAppearanceFree(self->a_icon);
}
void frame_free(ObFrame *self)
diff --git a/openbox/frame.h b/openbox/frame.h
index 3e7b2c61..02be17a0 100644
--- a/openbox/frame.h
+++ b/openbox/frame.h
@@ -137,16 +137,6 @@ struct _ObFrame
Colormap colormap;
- RrAppearance *a_unfocused_title;
- RrAppearance *a_focused_title;
- RrAppearance *a_unfocused_label;
- RrAppearance *a_focused_label;
- RrAppearance *a_icon;
- RrAppearance *a_unfocused_handle;
- RrAppearance *a_focused_handle;
-
- GSList *clients;
-
gint icon_on; /* if the window icon button is on */
gint label_on; /* if the window title is on */
gint iconify_on; /* if the window iconify button is on */
diff --git a/openbox/framerender.c b/openbox/framerender.c
index af6be016..e4db2a06 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);
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 0c74b255..d1841437 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -36,6 +36,7 @@
#include "focus_cycle_popup.h"
#include "moveresize.h"
#include "frame.h"
+#include "framerender.h"
#include "keyboard.h"
#include "mouse.h"
#include "extensions.h"