]> Dogcows Code - chaz/openbox/blobdiff - openbox/framerender.c
give different border colors to active and inactive windows. adjust the xml theme...
[chaz/openbox] / openbox / framerender.c
index 28597338206d6bdd8bdb6d4497093fd09b9438ce..97d5ef53ea4e55c7035fc9cafcf31e28c0c98ec3 100644 (file)
@@ -2,7 +2,7 @@
 
    framerender.c for the Openbox window manager
    Copyright (c) 2006        Mikael Magnusson
-   Copyright (c) 2003        Ben Jansens
+   Copyright (c) 2003-2007   Dana Jansens
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -40,8 +40,18 @@ void framerender_frame(ObFrame *self)
         px = (self->focused ?
               RrColorPixel(ob_rr_theme->cb_focused_color) :
               RrColorPixel(ob_rr_theme->cb_unfocused_color));
-        XSetWindowBackground(ob_display, self->plate, px);
-        XClearWindow(ob_display, self->plate);
+        XSetWindowBackground(ob_display, self->inner, px);
+        XClearWindow(ob_display, self->inner);
+
+        px = (self->focused ?
+              RrColorPixel(ob_rr_theme->frame_focused_border_color) :
+              RrColorPixel(ob_rr_theme->frame_unfocused_border_color));
+        XSetWindowBorder(ob_display, self->window, px);
+        XSetWindowBorder(ob_display, self->inner, px);
+        XSetWindowBorder(ob_display, self->title, px);
+        XSetWindowBorder(ob_display, self->handle, px);
+        XSetWindowBorder(ob_display, self->rgrip, px);
+        XSetWindowBorder(ob_display, self->lgrip, px);
     }
 
     if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
@@ -265,7 +275,7 @@ void framerender_frame(ObFrame *self)
 
 static void framerender_label(ObFrame *self, RrAppearance *a)
 {
-    if (self->label_x < 0) return;
+    if (!self->label_on) return;
     /* set the texture's text! */
     a->texture[0].data.text.string = self->client->title;
     RrPaint(a, self->label, self->label_width, ob_rr_theme->label_height);
@@ -275,7 +285,7 @@ static void framerender_icon(ObFrame *self, RrAppearance *a)
 {
     const ObClientIcon *icon;
 
-    if (self->icon_x < 0) return;
+    if (!self->icon_on) return;
 
     icon = client_icon(self->client,
                        ob_rr_theme->button_size + 2,
@@ -294,33 +304,33 @@ static void framerender_icon(ObFrame *self, RrAppearance *a)
 
 static void framerender_max(ObFrame *self, RrAppearance *a)
 {
-    if (self->max_x < 0) return;
+    if (!self->max_on) return;
     RrPaint(a, self->max, ob_rr_theme->button_size, ob_rr_theme->button_size);
 }
 
 static void framerender_iconify(ObFrame *self, RrAppearance *a)
 {
-    if (self->iconify_x < 0) return;
+    if (!self->iconify_on) return;
     RrPaint(a, self->iconify,
             ob_rr_theme->button_size, ob_rr_theme->button_size);
 }
 
 static void framerender_desk(ObFrame *self, RrAppearance *a)
 {
-    if (self->desk_x < 0) return;
+    if (!self->desk_on) return;
     RrPaint(a, self->desk, ob_rr_theme->button_size, ob_rr_theme->button_size);
 }
 
 static void framerender_shade(ObFrame *self, RrAppearance *a)
 {
-    if (self->shade_x < 0) return;
+    if (!self->shade_on) return;
     RrPaint(a, self->shade,
             ob_rr_theme->button_size, ob_rr_theme->button_size);
 }
 
 static void framerender_close(ObFrame *self, RrAppearance *a)
 {
-    if (self->close_x < 0) return;
+    if (!self->close_on) return;
     RrPaint(a, self->close,
             ob_rr_theme->button_size, ob_rr_theme->button_size);
 }
This page took 0.02182 seconds and 4 git commands to generate.