]> Dogcows Code - chaz/openbox/commitdiff
we alloc theme elements for every window frame, but really it is unneccesary
authorDana Jansens <danakj@orodu.net>
Sun, 27 Jan 2008 07:53:26 +0000 (02:53 -0500)
committerDana Jansens <danakj@orodu.net>
Sun, 27 Jan 2008 07:53:26 +0000 (02:53 -0500)
openbox/frame.c
openbox/frame.h
openbox/framerender.c
openbox/openbox.c

index a47c2f06a9f1e2d46dcfbfa7b9c3b8b99b8f30af..8fee3b69e439bcb6f8a354d9d0f83ea21cb3050f 100644 (file)
@@ -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)
index 3e7b2c619a0a63d67d6d40821e0689472742259e..02be17a004745f4ad69d22a52fc8d210ee81346d 100644 (file)
@@ -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 */
index af6be016565332c88aac3a8f7a424db4321a4a83..e4db2a06e6734812a8cfbcc60c0e038490a4bf80 100644 (file)
@@ -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);
 
index 0c74b255bae8fdef00a64f4b54c8bacf975b064c..d1841437cdc25e5f43e5d9b1b79d9c5eb4ea8ca4 100644 (file)
@@ -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"
This page took 0.030114 seconds and 4 git commands to generate.