From aeec6ad43c78ee639f90f1e6df8113bc6546c152 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Beno=C3=AEt=20Gschwind?= <doth.gschwind@gmail.com>
Date: Thu, 14 Feb 2008 21:17:33 +0100
Subject: [PATCH] Clean up to follow openbox source layout.

---
 engines/concept/config.c                 |  340 ++--
 engines/concept/config.h                 |   10 +-
 engines/concept/plugin.c                 |  785 ++++----
 engines/concept/plugin.h                 |   49 +-
 engines/concept2/frame_concept2_config.c |  300 ++--
 engines/concept2/frame_concept2_config.h |   10 +-
 engines/concept2/frame_concept2_plugin.c |  731 ++++----
 engines/concept2/frame_concept2_plugin.h |    7 +-
 engines/concept2/frame_concept2_render.c |   20 +-
 engines/concept2/frame_concept2_render.h |   24 +-
 engines/default/config.c                 | 1586 +++++++--------
 engines/default/config.h                 |   10 +-
 engines/default/plugin.c                 | 3232 +++++++++++++++---------------
 engines/default/plugin.h                 |   35 +-
 engines/default/render.c                 |  324 ++--
 engines/default/render.h                 |   26 +-
 engines/minimal/frame_minimal_config.c   | 1373 ++++++-------
 engines/minimal/frame_minimal_config.h   |   10 +-
 engines/minimal/frame_minimal_plugin.c   | 1756 ++++++++---------
 engines/minimal/frame_minimal_plugin.h   |    9 +-
 engines/minimal/frame_minimal_render.c   |  249 ++--
 engines/minimal/frame_minimal_render.h   |   24 +-
 openbox/client.c                         |   20 +-
 openbox/client_menu.c                    |    4 +-
 openbox/engine_interface.c               |  394 ++--
 openbox/engine_interface.h               |   94 +-
 openbox/event.c                          |   42 +-
 openbox/focus_cycle.c                    |    8 +-
 openbox/openbox.c                        |    4 +-
 openbox/screen.c                         |   12 +-
 tests/aspect.c                           |    4 +-
 tests/big.c                              |    4 +-
 tests/borderchange.c                     |    4 +-
 tests/extentsrequest.c                   |    6 +-
 tests/fallback.c                         |    2 +-
 tests/fullscreen.c                       |    8 +-
 tests/grav.c                             |    4 +-
 tests/groupmodal.c                       |    4 +-
 tests/grouptran.c                        |    4 +-
 tests/grouptran2.c                       |    4 +-
 tests/grouptrancircular.c                |    4 +-
 tests/grouptrancircular2.c               |    4 +-
 tests/mapiconic.c                        |    4 +-
 tests/modal.c                            |   10 +-
 tests/modal2.c                           |   10 +-
 tests/modal3.c                           |   12 +-
 tests/noresize.c                         |    4 +-
 tests/override.c                         |    4 +-
 tests/resize.c                           |    4 +-
 tests/shape.c                            |    4 +-
 tests/skiptaskbar.c                      |    4 +-
 tests/skiptaskbar2.c                     |    4 +-
 tests/stacking.c                         |    4 +-
 tests/strut.c                            |    4 +-
 tests/title.c                            |    4 +-
 tests/urgent.c                           |    4 +-
 56 files changed, 5618 insertions(+), 5998 deletions(-)

diff --git a/engines/concept/config.c b/engines/concept/config.c
index b80ba47..b88348b 100644
--- a/engines/concept/config.c
+++ b/engines/concept/config.c
@@ -33,175 +33,184 @@
 #include "config.h"
 #include "plugin.h"
 
-void load_pixmap (const gchar * theme_name, const gchar * base_name, GdkPixbuf ** gp, Pixmap * p);
+void load_pixmap(const gchar * theme_name, const gchar * base_name,
+        GdkPixbuf ** gp, Pixmap * p);
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value);
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value);
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value);
+        const gchar *rname, RrColor **value);
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans);
+        const gchar *rname, RrAppearance *value, gboolean allow_trans);
 static int parse_inline_number(const char *p);
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data);
 static void set_default_appearance(RrAppearance *a);
 
-
-
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font)
-  {
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font)
+{
     gchar *str;
 
-    if (!read_int (db, "concept.border_width", &theme_config.border_width))
-      {
+    if (!read_int(db, "concept.border_width", &theme_config.border_width)) {
         theme_config.border_width = 2;
-      }
+    }
     if (!read_color(db, inst, "concept.focus_border_color",
-        &theme_config.focus_border_color))
-    {
-      theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.focus_border_color)) {
+        theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
     }
 
     if (!read_color(db, inst, "concept.focus_corner_color",
-        &theme_config.focus_corner_color))
-    {
-      theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.focus_corner_color)) {
+        theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
     }
 
     if (!read_color(db, inst, "concept.unfocus_border_color",
-        &theme_config.unfocus_border_color))
-    {
-      theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.unfocus_border_color)) {
+        theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
     }
 
     if (!read_color(db, inst, "concept.unfocus_corner_color",
-        &theme_config.unfocus_corner_color))
-    {
-      theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.unfocus_corner_color)) {
+        theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
     }
 
     theme_config.inst = inst;
     theme_config.name = g_strdup(name ? name : DEFAULT_THEME);
 
-    gdk_pixbuf_xlib_init (plugin.ob_display, plugin.ob_screen);
-
-    load_pixmap(name, "focus-top.png", &theme_config.focus_top, &theme_config.px_focus_top);
-    load_pixmap(name, "focus-left.png", &theme_config.focus_left, &theme_config.px_focus_left);
-    load_pixmap(name, "focus-right.png", &theme_config.focus_right, &theme_config.px_focus_right);
-    load_pixmap(name, "focus-bottom.png", &theme_config.focus_bottom, &theme_config.px_focus_bottom);
-
-    load_pixmap(name, "unfocus-top.png", &theme_config.unfocus_top, &theme_config.px_unfocus_top);
-    load_pixmap(name, "unfocus-left.png", &theme_config.unfocus_left, &theme_config.px_unfocus_left);
-    load_pixmap(name, "unfocus-right.png", &theme_config.unfocus_right, &theme_config.px_unfocus_right);
-    load_pixmap(name, "unfocus-bottom.png", &theme_config.unfocus_bottom, &theme_config.px_unfocus_bottom);
-
-    load_pixmap(name, "focus-topleft.png", &theme_config.focus_topleft, &theme_config.px_focus_topleft);
-    load_pixmap(name, "focus-bottomleft.png", &theme_config.focus_bottomleft, &theme_config.px_focus_bottomleft);
-    load_pixmap(name, "focus-topright.png", &theme_config.focus_topright, &theme_config.px_focus_topright);
-    load_pixmap(name, "focus-bottomright.png", &theme_config.focus_bottomright, &theme_config.px_focus_bottomright);
-
-    load_pixmap(name, "unfocus-topleft.png", &theme_config.unfocus_topleft, &theme_config.px_unfocus_topleft);
-    load_pixmap(name, "unfocus-bottomleft.png", &theme_config.unfocus_bottomleft, &theme_config.px_unfocus_bottomleft);
-    load_pixmap(name, "unfocus-topright.png", &theme_config.unfocus_topright, &theme_config.px_unfocus_topright);
-    load_pixmap(name, "unfocus-bottomright.png", &theme_config.unfocus_bottomright, &theme_config.px_unfocus_bottomright);
+    gdk_pixbuf_xlib_init(plugin.ob_display, plugin.ob_screen);
+
+    load_pixmap(name, "focus-top.png", &theme_config.focus_top,
+            &theme_config.px_focus_top);
+    load_pixmap(name, "focus-left.png", &theme_config.focus_left,
+            &theme_config.px_focus_left);
+    load_pixmap(name, "focus-right.png", &theme_config.focus_right,
+            &theme_config.px_focus_right);
+    load_pixmap(name, "focus-bottom.png", &theme_config.focus_bottom,
+            &theme_config.px_focus_bottom);
+
+    load_pixmap(name, "unfocus-top.png", &theme_config.unfocus_top,
+            &theme_config.px_unfocus_top);
+    load_pixmap(name, "unfocus-left.png", &theme_config.unfocus_left,
+            &theme_config.px_unfocus_left);
+    load_pixmap(name, "unfocus-right.png", &theme_config.unfocus_right,
+            &theme_config.px_unfocus_right);
+    load_pixmap(name, "unfocus-bottom.png", &theme_config.unfocus_bottom,
+            &theme_config.px_unfocus_bottom);
+
+    load_pixmap(name, "focus-topleft.png", &theme_config.focus_topleft,
+            &theme_config.px_focus_topleft);
+    load_pixmap(name, "focus-bottomleft.png", &theme_config.focus_bottomleft,
+            &theme_config.px_focus_bottomleft);
+    load_pixmap(name, "focus-topright.png", &theme_config.focus_topright,
+            &theme_config.px_focus_topright);
+    load_pixmap(name, "focus-bottomright.png", &theme_config.focus_bottomright,
+            &theme_config.px_focus_bottomright);
+
+    load_pixmap(name, "unfocus-topleft.png", &theme_config.unfocus_topleft,
+            &theme_config.px_unfocus_topleft);
+    load_pixmap(name, "unfocus-bottomleft.png",
+            &theme_config.unfocus_bottomleft,
+            &theme_config.px_unfocus_bottomleft);
+    load_pixmap(name, "unfocus-topright.png", &theme_config.unfocus_topright,
+            &theme_config.px_unfocus_topright);
+    load_pixmap(name, "unfocus-bottomright.png",
+            &theme_config.unfocus_bottomright,
+            &theme_config.px_unfocus_bottomright);
 
     return 1;
-  }
+}
 
-void load_pixmap (const gchar * theme_name, const gchar * base_name, GdkPixbuf ** gp, Pixmap * p)
+void load_pixmap(const gchar * theme_name, const gchar * base_name,
+        GdkPixbuf ** gp, Pixmap * p)
 {
-	gchar * s = g_build_filename (g_get_home_dir(), ".themes", theme_name, "openbox-3", base_name, NULL);
-	ob_debug ("Load file %s.\n", s);
-	*gp = gdk_pixbuf_new_from_file (s, NULL);
-	//GdkPixbuff * mask = NULL;
-	gdk_pixbuf_xlib_render_pixmap_and_mask (*gp, p, NULL, 128);
-	g_free (s);
+    gchar * s = g_build_filename(g_get_home_dir(), ".themes", theme_name,
+            "openbox-3", base_name, NULL);
+    ob_debug("Load file %s.\n", s);
+    *gp = gdk_pixbuf_new_from_file(s, NULL);
+    //GdkPixbuff * mask = NULL;
+    gdk_pixbuf_xlib_render_pixmap_and_mask(*gp, p, NULL, 128);
+    g_free(s);
 }
 
 static gchar *create_class_name(const gchar *rname)
-  {
+{
     gchar *rclass = g_strdup(rname);
     gchar *p = rclass;
 
-    while (TRUE)
-      {
+    while (TRUE) {
         *p = toupper(*p);
         p = strchr(p+1, '.');
         if (p == NULL)
-          break;
+            break;
         ++p;
         if (*p == '\0')
-          break;
-      }
+            break;
+    }
     return rclass;
-  }
+}
 
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype, *end;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = (gint)strtol(retvalue.addr, &end, 10);
         if (end != retvalue.addr)
-          ret = TRUE;
-      }
+            ret = TRUE;
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = retvalue.addr;
         ret = TRUE;
-      }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value)
-  {
+        const gchar *rname, RrColor **value)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         RrColor *c = RrColorParse(inst, retvalue.addr);
-        if (c != NULL)
-          {
+        if (c != NULL) {
             *value = c;
             ret = TRUE;
-          }
-      }
+        }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
-  {
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
+{
     gboolean ret = FALSE;
     gchar *s;
     gint hx, hy; /* ignored */
@@ -209,89 +218,82 @@ static gboolean read_mask(const RrInstance *inst, const gchar *path,
     guchar *b;
 
     s = g_build_filename(path, maskname, NULL);
-    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess)
-      {
+    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) {
         ret = TRUE;
         *value = RrPixmapMaskNew(inst, w, h, (gchar*)b);
         XFree(b);
-      }
+    }
     g_free(s);
 
     return ret;
-  }
+}
 
 static void parse_appearance(gchar *tex, RrSurfaceColorType *grad,
-    RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
-    gboolean *border, gboolean allow_trans)
-  {
+        RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
+        gboolean *border, gboolean allow_trans)
+{
     gchar *t;
 
     /* convert to all lowercase */
     for (t = tex; *t != '\0'; ++t)
-      *t = g_ascii_tolower(*t);
+        *t = g_ascii_tolower(*t);
 
-    if (allow_trans && strstr(tex, "parentrelative") != NULL)
-      {
+    if (allow_trans && strstr(tex, "parentrelative") != NULL) {
         *grad = RR_SURFACE_PARENTREL;
-      }
-    else
-      {
-        if (strstr(tex, "gradient") != NULL)
-          {
+    }
+    else {
+        if (strstr(tex, "gradient") != NULL) {
             if (strstr(tex, "crossdiagonal") != NULL)
-              *grad = RR_SURFACE_CROSS_DIAGONAL;
+                *grad = RR_SURFACE_CROSS_DIAGONAL;
             else if (strstr(tex, "pyramid") != NULL)
-              *grad = RR_SURFACE_PYRAMID;
+                *grad = RR_SURFACE_PYRAMID;
             else if (strstr(tex, "mirrorhorizontal") != NULL)
-              *grad = RR_SURFACE_MIRROR_HORIZONTAL;
+                *grad = RR_SURFACE_MIRROR_HORIZONTAL;
             else if (strstr(tex, "horizontal") != NULL)
-              *grad = RR_SURFACE_HORIZONTAL;
+                *grad = RR_SURFACE_HORIZONTAL;
             else if (strstr(tex, "splitvertical") != NULL)
-              *grad = RR_SURFACE_SPLIT_VERTICAL;
+                *grad = RR_SURFACE_SPLIT_VERTICAL;
             else if (strstr(tex, "vertical") != NULL)
-              *grad = RR_SURFACE_VERTICAL;
+                *grad = RR_SURFACE_VERTICAL;
             else
-              *grad = RR_SURFACE_DIAGONAL;
-          }
-        else
-          {
+                *grad = RR_SURFACE_DIAGONAL;
+        }
+        else {
             *grad = RR_SURFACE_SOLID;
-          }
-      }
+        }
+    }
 
     if (strstr(tex, "sunken") != NULL)
-      *relief = RR_RELIEF_SUNKEN;
+        *relief = RR_RELIEF_SUNKEN;
     else if (strstr(tex, "flat") != NULL)
-      *relief = RR_RELIEF_FLAT;
+        *relief = RR_RELIEF_FLAT;
     else if (strstr(tex, "raised") != NULL)
-      *relief = RR_RELIEF_RAISED;
+        *relief = RR_RELIEF_RAISED;
     else
-      *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
-          : RR_RELIEF_RAISED;
+        *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
+                : RR_RELIEF_RAISED;
 
     *border = FALSE;
-    if (*relief == RR_RELIEF_FLAT)
-      {
+    if (*relief == RR_RELIEF_FLAT) {
         if (strstr(tex, "border") != NULL)
-          *border = TRUE;
-      }
-    else
-      {
+            *border = TRUE;
+    }
+    else {
         if (strstr(tex, "bevel2") != NULL)
-          *bevel = RR_BEVEL_2;
+            *bevel = RR_BEVEL_2;
         else
-          *bevel = RR_BEVEL_1;
-      }
+            *bevel = RR_BEVEL_1;
+    }
 
     if (strstr(tex, "interlaced") != NULL)
-      *interlaced = TRUE;
+        *interlaced = TRUE;
     else
-      *interlaced = FALSE;
-  }
+        *interlaced = FALSE;
+}
 
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans)
-  {
+        const gchar *rname, RrAppearance *value, gboolean allow_trans)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *cname, *ctoname, *bcname, *icname, *hname, *sname;
@@ -310,32 +312,29 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     ctosplitname = g_strconcat(rname, ".colorTo.splitTo", NULL);
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         parse_appearance(retvalue.addr, &value->surface.grad,
-            &value->surface.relief, &value->surface.bevel,
-            &value->surface.interlaced, &value->surface.border, allow_trans);
+                &value->surface.relief, &value->surface.bevel,
+                &value->surface.interlaced, &value->surface.border, allow_trans);
         if (!read_color(db, inst, cname, &value->surface.primary))
-          value->surface.primary = RrColorNew(inst, 0, 0, 0);
+            value->surface.primary = RrColorNew(inst, 0, 0, 0);
         if (!read_color(db, inst, ctoname, &value->surface.secondary))
-          value->surface.secondary = RrColorNew(inst, 0, 0, 0);
+            value->surface.secondary = RrColorNew(inst, 0, 0, 0);
         if (value->surface.border)
-          if (!read_color(db, inst, bcname, &value->surface.border_color))
-            value->surface.border_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, bcname, &value->surface.border_color))
+                value->surface.border_color = RrColorNew(inst, 0, 0, 0);
         if (value->surface.interlaced)
-          if (!read_color(db, inst, icname, &value->surface.interlace_color))
-            value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, icname, &value->surface.interlace_color))
+                value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
         if (read_int(db, hname, &i) && i >= 0)
-          value->surface.bevel_light_adjust = i;
+            value->surface.bevel_light_adjust = i;
         if (read_int(db, sname, &i) && i >= 0 && i <= 256)
-          value->surface.bevel_dark_adjust = i;
+            value->surface.bevel_dark_adjust = i;
 
-        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL)
-          {
+        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL) {
             gint r, g, b;
 
-            if (!read_color(db, inst, csplitname, &value->surface.split_primary))
-              {
+            if (!read_color(db, inst, csplitname, &value->surface.split_primary)) {
                 r = value->surface.primary->r;
                 r += r >> 2;
                 g = value->surface.primary->g;
@@ -343,17 +342,16 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.primary->b;
                 b += b >> 2;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_primary = RrColorNew(inst, r, g, b);
-              }
+            }
 
             if (!read_color(db, inst, ctosplitname,
-                &value->surface.split_secondary))
-              {
+                    &value->surface.split_secondary)) {
                 r = value->surface.secondary->r;
                 r += r >> 4;
                 g = value->surface.secondary->g;
@@ -361,17 +359,17 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.secondary->b;
                 b += b >> 4;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_secondary = RrColorNew(inst, r, g, b);
-              }
-          }
+            }
+        }
 
         ret = TRUE;
-      }
+    }
 
     g_free(ctosplitname);
     g_free(csplitname);
@@ -383,25 +381,24 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     g_free(cname);
     g_free(rclass);
     return ret;
-  }
+}
 
 static int parse_inline_number(const char *p)
-  {
+{
     int neg = 1;
     int res = 0;
-    if (*p == '-')
-      {
+    if (*p == '-') {
         neg = -1;
         ++p;
-      }
+    }
     for (; isdigit(*p); ++p)
-      res = res * 10 + *p - '0';
+        res = res * 10 + *p - '0';
     res *= neg;
     return res;
-  }
+}
 
 static void set_default_appearance(RrAppearance *a)
-  {
+{
     a->surface.grad = RR_SURFACE_SOLID;
     a->surface.relief = RR_RELIEF_FLAT;
     a->surface.bevel = RR_BEVEL_1;
@@ -409,28 +406,27 @@ static void set_default_appearance(RrAppearance *a)
     a->surface.border = FALSE;
     a->surface.primary = RrColorNew(a->inst, 0, 0, 0);
     a->surface.secondary = RrColorNew(a->inst, 0, 0, 0);
-  }
+}
 
 /* Reads the output from gimp's C-Source file format into valid RGBA data for
  an RrTextureRGBA. */
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data)
-  {
+{
     RrPixel32 *im, *p;
     gint i;
 
     p = im = g_memdup(data, width * height * sizeof(RrPixel32));
 
-    for (i = 0; i < width * height; ++i)
-      {
+    for (i = 0; i < width * height; ++i) {
         guchar a = ((*p >> 24) & 0xff);
         guchar b = ((*p >> 16) & 0xff);
         guchar g = ((*p >> 8) & 0xff);
         guchar r = ((*p >> 0) & 0xff);
 
         *p = ((r << RrDefaultRedOffset) + (g << RrDefaultGreenOffset) + (b
-            << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
+                << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
         p++;
-      }
+    }
 
     return im;
-  }
+}
diff --git a/engines/concept/config.h b/engines/concept/config.h
index 40a81ae..d328fb7 100644
--- a/engines/concept/config.h
+++ b/engines/concept/config.h
@@ -26,7 +26,7 @@
 G_BEGIN_DECLS
 
 struct _ObFrameThemeConfig
-  {
+{
     const RrInstance *inst;
 
     gint border_width;
@@ -76,16 +76,16 @@ struct _ObFrameThemeConfig
     Pixmap px_unfocus_bottomright;
 
     gchar *name;
-  };
+};
 
 typedef struct _ObFrameThemeConfig ObFrameThemeConfig;
 
 /*! The font values are all optional. If a NULL is used for any of them, then
  the default font will be used. */
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font);
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font);
 
 G_END_DECLS
 
diff --git a/engines/concept/plugin.c b/engines/concept/plugin.c
index 698cd24..3b4c2e9 100644
--- a/engines/concept/plugin.c
+++ b/engines/concept/plugin.c
@@ -32,13 +32,13 @@
 #include "plugin.h"
 
 typedef enum
-  {
+{
     OB_FLAG_MAX = 1 << 0,
     OB_FLAG_CLOSE = 1 << 1,
     OB_FLAG_DESK = 1 << 2,
     OB_FLAG_SHADE = 1 << 3,
     OB_FLAG_ICONIFY = 1 << 4
-  } ObFrameFlags;
+} ObFrameFlags;
 
 #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
                          ButtonPressMask | ButtonReleaseMask | \
@@ -53,46 +53,46 @@ typedef enum
 #define FRAME_HANDLE_Y(f) (f->size.top + f->client->area.height + f->cbwidth_b)
 
 static gulong frame_animate_iconify_time_left(gpointer _self,
-    const GTimeVal *now);
+        const GTimeVal *now);
 
 Window createWindow(Window parent, Visual *visual, gulong mask,
-    XSetWindowAttributes *attrib)
-  {
+        XSetWindowAttributes *attrib)
+{
     return XCreateWindow(plugin.ob_display, parent, 0, 0, 1, 1, 0, (visual ? 32
-        : RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
-        : RrVisual(plugin.ob_rr_inst)), mask, attrib);
+            : RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
+            : RrVisual(plugin.ob_rr_inst)), mask, attrib);
 
-  }
+}
 
 Visual *check_32bit_client(ObClient *c)
-  {
+{
     XWindowAttributes wattrib;
     Status ret;
 
     /* we're already running at 32 bit depth, yay. we don't need to use their
      visual */
     if (RrDepth(plugin.ob_rr_inst) == 32)
-      return NULL;
+        return NULL;
 
     ret = XGetWindowAttributes(plugin.ob_display, c->window, &wattrib);
     g_assert(ret != BadDrawable);
     g_assert(ret != BadWindow);
 
     if (wattrib.depth == 32)
-      return wattrib.visual;
+        return wattrib.visual;
     return NULL;
-  }
+}
 
 /* Not used */
 gint init(Display * display, gint screen)
-  {
+{
     plugin.ob_display = display;
     plugin.ob_screen = screen;
-  }
+}
 
 /* Create a frame */
 gpointer frame_new(struct _ObClient * client)
-  {
+{
     XSetWindowAttributes attrib;
     gulong mask;
     ObConceptFrame *self;
@@ -106,30 +106,29 @@ gpointer frame_new(struct _ObClient * client)
     /* create the non-visible decor windows */
 
     mask = 0;
-    if (visual)
-      {
+    if (visual) {
         /* client has a 32-bit visual */
         mask |= CWColormap | CWBackPixel | CWBorderPixel;
         /* create a colormap with the visual */
         OBCONCEPTFRAME(self)->colormap = attrib.colormap = XCreateColormap(
-            plugin.ob_display, RootWindow(plugin.ob_display, plugin.ob_screen),
-            visual, AllocNone);
+                plugin.ob_display, RootWindow(plugin.ob_display,
+                        plugin.ob_screen), visual, AllocNone);
         attrib.background_pixel = BlackPixel(plugin.ob_display,
-            plugin.ob_screen);
+                plugin.ob_screen);
         attrib.border_pixel = BlackPixel(plugin.ob_display, plugin.ob_screen);
-      }
+    }
     self->window = createWindow(
-        RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask, &attrib);
+            RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask,
+            &attrib);
 
     /* create the visible decor windows */
 
     mask = 0;
-    if (visual)
-      {
+    if (visual) {
         /* client has a 32-bit visual */
         mask |= CWColormap | CWBackPixel | CWBorderPixel;
         attrib.colormap = RrColormap(plugin.ob_rr_inst);
-      }
+    }
 
     self->background = createWindow(self->window, NULL, mask, &attrib);
 
@@ -158,10 +157,10 @@ gpointer frame_new(struct _ObClient * client)
     set_theme_statics(self);
 
     return self;
-  }
+}
 
 void set_theme_statics(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* do this before changing the frame's status like max_horz max_vert */
 
@@ -169,27 +168,26 @@ void set_theme_statics(gpointer _self)
     XResizeWindow(plugin.ob_display, self->top_right, 5, 5);
     XResizeWindow(plugin.ob_display, self->bottom_left, 5, 5);
     XResizeWindow(plugin.ob_display, self->bottom_right, 5, 5);
-  }
+}
 
 void free_theme_statics(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-  }
+}
 
 void frame_free(gpointer self)
-  {
+{
     free_theme_statics(OBCONCEPTFRAME(self));
     XDestroyWindow(plugin.ob_display, OBCONCEPTFRAME(self)->window);
     if (OBCONCEPTFRAME(self)->colormap)
-      XFreeColormap(plugin.ob_display, OBCONCEPTFRAME(self)->colormap);
+        XFreeColormap(plugin.ob_display, OBCONCEPTFRAME(self)->colormap);
     g_free(self);
-  }
+}
 
 void frame_show(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-    if (!self->visible)
-      {
+    if (!self->visible) {
         self->visible = TRUE;
         frame_update_skin(self);
         /* Grab the server to make sure that the frame window is mapped before
@@ -199,75 +197,74 @@ void frame_show(gpointer _self)
         XMapWindow(plugin.ob_display, self->client->window);
         XMapWindow(plugin.ob_display, self->window);
         grab_server(FALSE);
-      }
-  }
+    }
+}
 
 gint frame_hide(gpointer self)
-  {
-    if (OBCONCEPTFRAME(self)->visible)
-      {
+{
+    if (OBCONCEPTFRAME(self)->visible) {
         OBCONCEPTFRAME(self)->visible = FALSE;
         if (!frame_iconify_animating(self))
-          XUnmapWindow(plugin.ob_display, OBCONCEPTFRAME(self)->window);
+            XUnmapWindow(plugin.ob_display, OBCONCEPTFRAME(self)->window);
         /* we unmap the client itself so that we can get MapRequest
          events, and because the ICCCM tells us to! */
         XUnmapWindow(plugin.ob_display, OBCONCEPTFRAME(self)->client->window);
         /* We ignore 1 unmap */
         return 1;
-      }
+    }
     else
-      return 0;
-  }
+        return 0;
+}
 
 void frame_adjust_theme(gpointer self)
-  {
+{
     free_theme_statics(self);
     set_theme_statics(self);
-  }
+}
 
 void frame_adjust_shape(gpointer _self)
-  {
+{
 #ifdef SHAPE
     ObConceptFrame * self = (ObConceptFrame *) _self;
     gint num;
     XRectangle xrect[2];
 
     if (!self->client->shaped)
-      {
+    {
         /* clear the shape on the frame window */
         XShapeCombineMask(plugin.ob_display, self->window, ShapeBounding,
-            self->size.left,
-            self->size.top,
-            None, ShapeSet);
-      }
+                self->size.left,
+                self->size.top,
+                None, ShapeSet);
+    }
     else
-      {
+    {
         /* make the frame's shape match the clients */
         XShapeCombineShape(plugin.ob_display, self->window, ShapeBounding,
-            self->size.left,
-            self->size.top,
-            self->client->window,
-            ShapeBounding, ShapeSet);
+                self->size.left,
+                self->size.top,
+                self->client->window,
+                ShapeBounding, ShapeSet);
 
         num = 0;
         if (self->decorations)
-          {
+        {
             xrect[0].x = 0;
             xrect[0].y = 0;
             xrect[0].width = self->window_area.width;
             xrect[0].height = self->size.top;
             ++num;
-          }
+        }
 
         XShapeCombineRectangles(plugin.ob_display, self->window,
-            ShapeBounding, 0, 0, xrect, num,
-            ShapeUnion, Unsorted);
-      }
+                ShapeBounding, 0, 0, xrect, num,
+                ShapeUnion, Unsorted);
+    }
 #endif
-  }
+}
 
 void frame_grab(gpointer _self, GHashTable * map)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* DO NOT map the client window here. we used to do that, but it is bogus.
      we need to set up the client's dimensions and everything before we
@@ -284,7 +281,7 @@ void frame_grab(gpointer _self, GHashTable * map)
      for it.
      */
     if (ob_state() == OB_STATE_STARTING)
-      ++self->client->ignore_unmaps;
+        ++self->client->ignore_unmaps;
 
     /* select the event mask on the client's parent (to receive config/map
      req's) the ButtonPress is to catch clicks on the client border */
@@ -305,22 +302,21 @@ void frame_grab(gpointer _self, GHashTable * map)
     g_hash_table_insert(map, &self->bottom_left, self->client);
     g_hash_table_insert(map, &self->bottom_right, self->client);
 
-  }
+}
 
 void frame_ungrab(gpointer _self, GHashTable * map)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     XEvent ev;
     gboolean reparent = TRUE;
 
     /* if there was any animation going on, kill it */
     obt_main_loop_timeout_remove_data(plugin.ob_main_loop,
-        frame_animate_iconify, self, FALSE);
+            frame_animate_iconify, self, FALSE);
 
     /* check if the app has already reparented its window away */
     while (XCheckTypedWindowEvent(plugin.ob_display, self->client->window,
-        ReparentNotify, &ev))
-      {
+            ReparentNotify, &ev)) {
         /* This check makes sure we don't catch our own reparent action to
          our frame window. This doesn't count as the app reparenting itself
          away of course.
@@ -328,22 +324,20 @@ void frame_ungrab(gpointer _self, GHashTable * map)
          Reparent events that are generated by us are just discarded here.
          They are of no consequence to us anyhow.
          */
-        if (ev.xreparent.parent != self->window)
-          {
+        if (ev.xreparent.parent != self->window) {
             reparent = FALSE;
             XPutBackEvent(plugin.ob_display, &ev);
             break;
-          }
-      }
+        }
+    }
 
-    if (reparent)
-      {
+    if (reparent) {
         /* according to the ICCCM - if the client doesn't reparent itself,
          then we will reparent the window to root for them */
         XReparentWindow(plugin.ob_display, self->client->window, RootWindow(
-            plugin.ob_display, plugin.ob_screen), self->client->area.x,
-            self->client->area.y);
-      }
+                plugin.ob_display, plugin.ob_screen), self->client->area.x,
+                self->client->area.y);
+    }
 
     /* remove all the windows for the frame from the window_map */
     g_hash_table_remove(map, &self->window);
@@ -361,140 +355,130 @@ void frame_ungrab(gpointer _self, GHashTable * map)
     g_hash_table_remove(map, &self->bottom_right);
 
     obt_main_loop_timeout_remove_data(plugin.ob_main_loop, flash_timeout, self,
-        TRUE);
-  }
+            TRUE);
+}
 
 ObFrameContext frame_context(gpointer _self, Window win, gint x, gint y)
-  {
+{
     /* Here because client can be NULL */
     ObConceptFrame *self = OBCONCEPTFRAME(_self);
 
     if (self->shaded)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
     if (win == self->title)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
 
     if (win == self->window)
-      return OB_FRAME_CONTEXT_FRAME;
+        return OB_FRAME_CONTEXT_FRAME;
 
     if (win == self->bottom)
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
 
     if (win == self->bottom_left)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
 
     if (win == self->bottom_right)
-      return OB_FRAME_CONTEXT_BRCORNER;
+        return OB_FRAME_CONTEXT_BRCORNER;
 
     if (win == self->top)
-      return OB_FRAME_CONTEXT_TOP;
+        return OB_FRAME_CONTEXT_TOP;
 
     if (win == self->top_left)
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
 
     if (win == self->top_right)
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
 
     if (win == self->left)
-      return OB_FRAME_CONTEXT_LEFT;
+        return OB_FRAME_CONTEXT_LEFT;
     if (win == self->right)
-      return OB_FRAME_CONTEXT_RIGHT;
+        return OB_FRAME_CONTEXT_RIGHT;
 
     return OB_FRAME_CONTEXT_NONE;
-  }
+}
 
 void frame_set_is_visible(gpointer self, gboolean b)
-  {
+{
     OBCONCEPTFRAME(self)->visible = b;
-    if (b)
-      {
+    if (b) {
         OBCONCEPTFRAME(self)->frame_stase_flags |= OB_FRAME_STASE_IS_VISIBLE;
-      }
-    else
-      {
+    }
+    else {
         OBCONCEPTFRAME(self)->frame_stase_flags &= ~OB_FRAME_STASE_IS_VISIBLE;
-      }
-  }
+    }
+}
 
 void frame_set_is_focus(gpointer self, gboolean b)
-  {
+{
     OBCONCEPTFRAME(self)->focused = b;
-    if (b)
-      {
+    if (b) {
         OBCONCEPTFRAME(self)->frame_stase_flags |= OB_FRAME_STASE_IS_FOCUS;
-      }
-    else
-      {
+    }
+    else {
         OBCONCEPTFRAME(self)->frame_stase_flags &= ~OB_FRAME_STASE_IS_FOCUS;
-      }
-  }
+    }
+}
 
 void frame_set_is_max_vert(gpointer self, gboolean b)
-  {
+{
     OBCONCEPTFRAME(self)->max_vert = b;
-    if (b)
-      {
+    if (b) {
         OBCONCEPTFRAME(self)->frame_stase_flags |= OB_FRAME_STASE_IS_MAX_VERT;
-      }
-    else
-      {
+    }
+    else {
         OBCONCEPTFRAME(self)->frame_stase_flags &= ~OB_FRAME_STASE_IS_MAX_VERT;
-      }
-  }
+    }
+}
 
 void frame_set_is_max_horz(gpointer self, gboolean b)
-  {
+{
     OBCONCEPTFRAME(self)->max_horz = b;
-    if (b)
-      {
+    if (b) {
         OBCONCEPTFRAME(self)->frame_stase_flags |= OB_FRAME_STASE_IS_MAX_HORZ;
-      }
-    else
-      {
+    }
+    else {
         OBCONCEPTFRAME(self)->frame_stase_flags &= ~OB_FRAME_STASE_IS_MAX_HORZ;
-      }
-  }
+    }
+}
 
 void frame_set_is_shaded(gpointer self, gboolean b)
-  {
+{
     OBCONCEPTFRAME(self)->shaded = b;
-    if (b)
-      {
+    if (b) {
         OBCONCEPTFRAME(self)->frame_stase_flags |= OB_FRAME_STASE_IS_SHADED;
-      }
-    else
-      {
+    }
+    else {
         OBCONCEPTFRAME(self)->frame_stase_flags &= ~OB_FRAME_STASE_IS_SHADED;
-      }
-  }
+    }
+}
 
 void frame_unfocus(gpointer self)
-  {
+{
     OBCONCEPTFRAME(self)->focused = FALSE;
-  }
+}
 
 void frame_flash_start(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->flash_on = self->focused;
 
     if (!self->flashing)
-      obt_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
-          flash_timeout, self, g_direct_equal, flash_done);
+        obt_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
+                flash_timeout, self, g_direct_equal, flash_done);
     g_get_current_time(&self->flash_end);
     g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
 
     self->flashing = TRUE;
-  }
+}
 
 void frame_flash_stop(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->flashing = FALSE;
-  }
+}
 
 void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     gulong time;
     gboolean new_anim = FALSE;
@@ -504,111 +488,106 @@ void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
     /* if there is no titlebar, just don't animate for now
      XXX it would be nice tho.. */
     if (!(self->decorations & OB_FRAME_DECOR_TITLEBAR))
-      return;
+        return;
 
     /* get the current time */
     g_get_current_time(&now);
 
     /* get how long until the end */
     time = FRAME_ANIMATE_ICONIFY_TIME;
-    if (self->iconify_animation_going)
-      {
-        if (!!iconifying != (self->iconify_animation_going > 0))
-          {
+    if (self->iconify_animation_going) {
+        if (!!iconifying != (self->iconify_animation_going > 0)) {
             /* animation was already going on in the opposite direction */
             time = time - frame_animate_iconify_time_left(self, &now);
-          }
+        }
         else
-          /* animation was already going in the same direction */
-          set_end = FALSE;
-      }
+            /* animation was already going in the same direction */
+            set_end = FALSE;
+    }
     else
-      new_anim = TRUE;
+        new_anim = TRUE;
     self->iconify_animation_going = iconifying ? 1 : -1;
 
     /* set the ending time */
-    if (set_end)
-      {
+    if (set_end) {
         self->iconify_animation_end.tv_sec = now.tv_sec;
         self->iconify_animation_end.tv_usec = now.tv_usec;
         g_time_val_add(&self->iconify_animation_end, time);
-      }
+    }
 
-    if (new_anim)
-      {
+    if (new_anim) {
         obt_main_loop_timeout_remove_data(plugin.ob_main_loop,
-            frame_animate_iconify, self, FALSE);
-        obt_main_loop_timeout_add(plugin.ob_main_loop,
+                frame_animate_iconify, self, FALSE);
+        obt_main_loop_timeout_add(plugin.ob_main_loop, 
         FRAME_ANIMATE_ICONIFY_STEP_TIME, frame_animate_iconify, self,
-            g_direct_equal, NULL);
+                g_direct_equal, NULL);
 
         /* do the first step */
         frame_animate_iconify(self);
 
         /* show it during the animation even if it is not "visible" */
         if (!self->visible)
-          XMapWindow(plugin.ob_display, self->window);
-      }
-  }
+            XMapWindow(plugin.ob_display, self->window);
+    }
+}
 
 void frame_end_iconify_animation(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* see if there is an animation going */
     if (self->iconify_animation_going == 0)
-      return;
+        return;
 
     if (!self->visible)
-      XUnmapWindow(plugin.ob_display, self->window);
-    else
-      {
+        XUnmapWindow(plugin.ob_display, self->window);
+    else {
         /* Send a ConfigureNotify when the animation is done, this fixes
          KDE's pager showing the window in the wrong place.  since the
          window is mapped at a different location and is then moved, we
          need to send the synthetic configurenotify, since apps may have
          read the position when the client mapped, apparently. */
         client_reconfigure(self->client, TRUE);
-      }
+    }
 
     /* we're not animating any more ! */
     self->iconify_animation_going = 0;
 
     XMoveResizeWindow(plugin.ob_display, self->window, self->window_area.x,
-        self->window_area.y, self->window_area.width, self->window_area.height);
+            self->window_area.y, self->window_area.width,
+            self->window_area.height);
     /* we delay re-rendering until after we're done animating */
     frame_update_skin(self);
     XFlush(plugin.ob_display);
-  }
+}
 
 gboolean frame_iconify_animating(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     return self->iconify_animation_going != 0;
-  }
+}
 
 void frame_set_decorations(gpointer self, ObFrameDecorations d)
-  {
+{
     OBCONCEPTFRAME(self)->decorations = d;
-  }
+}
 
 Rect frame_get_window_area(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->window_area;
-  }
+}
 void frame_set_client_area(gpointer self, Rect r)
-  {
+{
     OBCONCEPTFRAME(self)->client_area = r;
-  }
+}
 
 void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
 
     /* do this before changing the frame's status like max_horz max_vert */
     frame_adjust_cursors(self);
 
-    if (self->decorations && !self->shaded)
-      {
+    if (self->decorations && !self->shaded) {
         self->cbwidth_l = 5;
         self->cbwidth_r = 5;
         self->cbwidth_t = 5;
@@ -617,53 +596,52 @@ void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
         self->title_width = 20;
 
         STRUT_SET(self->size, self->cbwidth_l, self->cbwidth_t, self->cbwidth_r
-            + self->title_width, self->cbwidth_b);
+                + self->title_width, self->cbwidth_b);
 
         RECT_SET_SIZE(self->window_area, self->client_area.width
-            + self->size.left + self->size.right, self->client_area.height
-            + self->size.top + self->size.bottom);
+                + self->size.left + self->size.right, self->client_area.height
+                + self->size.top + self->size.bottom);
 
-        if (!is_fake)
-          {
+        if (!is_fake) {
 
             XMoveResizeWindow(plugin.ob_display, self->top, 5, 0,
-                self->window_area.width - 10, theme_config.border_width);
+                    self->window_area.width - 10, theme_config.border_width);
             XMapWindow(plugin.ob_display, self->top);
 
             XMoveResizeWindow(plugin.ob_display, self->bottom, 5,
-                self->window_area.height - theme_config.border_width,
-                self->window_area.width - 10, theme_config.border_width);
+                    self->window_area.height - theme_config.border_width,
+                    self->window_area.width - 10, theme_config.border_width);
             XMapWindow(plugin.ob_display, self->bottom);
 
             XMoveResizeWindow(plugin.ob_display, self->left, 0,
-                theme_config.border_width, theme_config.border_width,
-                self->window_area.height - 2*theme_config.border_width);
+                    theme_config.border_width, theme_config.border_width,
+                    self->window_area.height - 2*theme_config.border_width);
             XMapWindow(plugin.ob_display, self->left);
 
             XMoveResizeWindow(plugin.ob_display, self->right,
-                self->window_area.width - theme_config.border_width,
-                theme_config.border_width, theme_config.border_width,
-                self->window_area.height - 2 *theme_config.border_width);
+                    self->window_area.width - theme_config.border_width,
+                    theme_config.border_width, theme_config.border_width,
+                    self->window_area.height - 2 *theme_config.border_width);
             XMapWindow(plugin.ob_display, self->right);
 
             XMoveWindow(plugin.ob_display, self->top_left, 0, 0);
             XMapWindow(plugin.ob_display, self->top_left);
             XMoveWindow(plugin.ob_display, self->top_right,
-                self->window_area.width - 5, 0);
+                    self->window_area.width - 5, 0);
             XMapWindow(plugin.ob_display, self->top_right);
             XMoveWindow(plugin.ob_display, self->bottom_left, 0,
-                self->window_area.height - theme_config.border_width);
+                    self->window_area.height - theme_config.border_width);
             XMapWindow(plugin.ob_display, self->bottom_left);
             XMoveWindow(plugin.ob_display, self->bottom_right,
-                self->window_area.width - 5, self->window_area.height
-                    - theme_config.border_width);
+                    self->window_area.width - 5, self->window_area.height
+                            - theme_config.border_width);
             XMapWindow(plugin.ob_display, self->bottom_right);
 
             XMoveResizeWindow(plugin.ob_display, self->title,
-                self->window_area.width - theme_config.border_width
-                    - self->title_width, theme_config.border_width,
-                self->title_width, self->window_area.height - 2
-                    *theme_config.border_width);
+                    self->window_area.width - theme_config.border_width
+                            - self->title_width, theme_config.border_width,
+                    self->title_width, self->window_area.height - 2
+                            *theme_config.border_width);
             XMapWindow(plugin.ob_display, self->title);
 
             /* find the new coordinates, done after setting the frame.size, for
@@ -671,31 +649,29 @@ void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
             self->window_area.x = self->client_area.x;
             self->window_area.y = self->client_area.y;
             frame_client_gravity(self->client, &self->window_area.x,
-                &self->window_area.y);
+                    &self->window_area.y);
 
             XMoveResizeWindow(plugin.ob_display, self->background,
-                theme_config.border_width, theme_config.border_width,
-                self->window_area.width - 2 * theme_config.border_width
-                    - self->title_width, self->window_area.height - 2
-                    * theme_config.border_width);
+                    theme_config.border_width, theme_config.border_width,
+                    self->window_area.width - 2 * theme_config.border_width
+                            - self->title_width, self->window_area.height - 2
+                            * theme_config.border_width);
             XMapWindow(plugin.ob_display, self->background);
 
-            if (!is_resize)
-              {
+            if (!is_resize) {
                 XMoveResizeWindow(plugin.ob_display, self->client->window,
-                    self->size.left, self->size.top, self->window_area.width
-                        - self->size.left - self->size.right,
-                    self->window_area.height - self->size.top
-                        - self->size.bottom);
-              }
+                        self->size.left, self->size.top,
+                        self->window_area.width - self->size.left
+                                - self->size.right, self->window_area.height
+                                - self->size.top - self->size.bottom);
+            }
             XMoveResizeWindow(plugin.ob_display, self->window,
-                self->window_area.x, self->window_area.y,
-                self->window_area.width, self->window_area.height);
+                    self->window_area.x, self->window_area.y,
+                    self->window_area.width, self->window_area.height);
 
-          }
-      }
-    else if (self->shaded)
-      {
+        }
+    }
+    else if (self->shaded) {
         self->cbwidth_l = 0;
         self->cbwidth_r = 0;
         self->cbwidth_b = 0;
@@ -704,17 +680,16 @@ void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
         self->title_width = 20;
 
         STRUT_SET(self->size, self->cbwidth_l, self->cbwidth_t, self->cbwidth_r
-            + self->title_width, self->cbwidth_b);
+                + self->title_width, self->cbwidth_b);
 
         RECT_SET_SIZE(self->window_area, 30, 30);
 
         /* find the new coordinates, done after setting the frame.size, for
          frame_client_gravity. */
         frame_client_gravity(self->client, &self->window_area.x,
-            &self->window_area.y);
+                &self->window_area.y);
 
-        if (!is_fake)
-          {
+        if (!is_fake) {
             XUnmapWindow(plugin.ob_display, self->top);
             XUnmapWindow(plugin.ob_display, self->bottom);
             XUnmapWindow(plugin.ob_display, self->left);
@@ -731,30 +706,29 @@ void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
 
             XMoveWindow(plugin.ob_display, self->window, 35, 35);
             XResizeWindow(plugin.ob_display, self->window, 30, 30);
-          }
-      }
+        }
+    }
     else // No decord :)
-      {
+    {
         self->cbwidth_l = 0;
         self->cbwidth_r = 0;
         self->cbwidth_b = 0;
         self->cbwidth_t = 0;
         STRUT_SET(self->size, self->cbwidth_l, self->cbwidth_t,
-            self->cbwidth_r, self->cbwidth_b);
+                self->cbwidth_r, self->cbwidth_b);
 
         RECT_SET_SIZE(self->window_area, self->client->area.width
-            + self->size.left + self->size.right, self->client->area.height
-            + self->size.top + self->size.bottom);
+                + self->size.left + self->size.right, self->client->area.height
+                + self->size.top + self->size.bottom);
 
         /* find the new coordinates, done after setting the frame.size, for
          frame_client_gravity. */
         self->window_area.x = self->client_area.x;
         self->window_area.y = self->client_area.y;
         frame_client_gravity(self->client, &self->window_area.x,
-            &self->window_area.y);
+                &self->window_area.y);
 
-        if (!is_fake)
-          {
+        if (!is_fake) {
             XUnmapWindow(plugin.ob_display, self->top);
             XUnmapWindow(plugin.ob_display, self->bottom);
             XUnmapWindow(plugin.ob_display, self->left);
@@ -767,176 +741,170 @@ void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
             XUnmapWindow(plugin.ob_display, self->title);
 
             XMoveResizeWindow(plugin.ob_display, self->background, 0, 0,
-                self->window_area.width, self->window_area.height);
+                    self->window_area.width, self->window_area.height);
             XMapWindow(plugin.ob_display, self->background);
-            if (!is_resize)
-              {
+            if (!is_resize) {
                 XMoveResizeWindow(plugin.ob_display, self->client->window,
-                    self->size.left, self->size.top, self->window_area.width,
-                    self->window_area.height);
-              }
+                        self->size.left, self->size.top,
+                        self->window_area.width, self->window_area.height);
+            }
             XMoveResizeWindow(plugin.ob_display, self->window,
-                self->window_area.x, self->window_area.y,
-                self->window_area.width, self->window_area.height);
-          }
-      }
-  }
+                    self->window_area.x, self->window_area.y,
+                    self->window_area.width, self->window_area.height);
+        }
+    }
+}
 
 void frame_update_skin(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     if (plugin.frame_iconify_animating(self))
-      return; /* delay redrawing until the animation is done */
+        return; /* delay redrawing until the animation is done */
 
     if (!self->visible)
-      return;
+        return;
     self->need_render = FALSE;
 
     gulong border_px, corner_px;
 
-    if (self->focused)
-      {
+    if (self->focused) {
         border_px = RrColorPixel(theme_config.focus_border_color);
         corner_px = RrColorPixel(theme_config.focus_corner_color);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->left,
-            theme_config.px_focus_left);
+                theme_config.px_focus_left);
         XClearWindow(plugin.ob_display, self->left);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->right,
-            theme_config.px_focus_right);
+                theme_config.px_focus_right);
         XClearWindow(plugin.ob_display, self->right);
 
         XSetWindowBackgroundPixmap(plugin.ob_display, self->top,
-            theme_config.px_focus_top);
+                theme_config.px_focus_top);
         XClearWindow(plugin.ob_display, self->top);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->bottom,
-            theme_config.px_focus_bottom);
+                theme_config.px_focus_bottom);
         XClearWindow(plugin.ob_display, self->bottom);
 
         XSetWindowBackgroundPixmap(plugin.ob_display, self->top_left,
-            theme_config.px_focus_topleft);
+                theme_config.px_focus_topleft);
         XClearWindow(plugin.ob_display, self->top_left);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->top_right,
-            theme_config.px_focus_topright);
+                theme_config.px_focus_topright);
         XClearWindow(plugin.ob_display, self->top_right);
 
         XSetWindowBackgroundPixmap(plugin.ob_display, self->bottom_left,
-            theme_config.px_focus_bottomleft);
+                theme_config.px_focus_bottomleft);
         XClearWindow(plugin.ob_display, self->bottom_left);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->bottom_right,
-            theme_config.px_focus_bottomright);
+                theme_config.px_focus_bottomright);
         XClearWindow(plugin.ob_display, self->bottom_right);
 
         XSetWindowBackground(plugin.ob_display, self->title, 0x00ffff);
         XClearWindow(plugin.ob_display, self->title);
         XSetWindowBackground(plugin.ob_display, self->background, 0);
         XClearWindow(plugin.ob_display, self->background);
-      }
-    else
-      {
+    }
+    else {
         border_px = RrColorPixel(theme_config.unfocus_border_color);
         corner_px = RrColorPixel(theme_config.unfocus_corner_color);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->left,
-            theme_config.px_unfocus_left);
+                theme_config.px_unfocus_left);
         XClearWindow(plugin.ob_display, self->left);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->right,
-            theme_config.px_unfocus_right);
+                theme_config.px_unfocus_right);
         XClearWindow(plugin.ob_display, self->right);
 
         XSetWindowBackgroundPixmap(plugin.ob_display, self->top,
-            theme_config.px_unfocus_top);
+                theme_config.px_unfocus_top);
         XClearWindow(plugin.ob_display, self->top);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->bottom,
-            theme_config.px_unfocus_bottom);
+                theme_config.px_unfocus_bottom);
         XClearWindow(plugin.ob_display, self->bottom);
 
         XSetWindowBackgroundPixmap(plugin.ob_display, self->top_left,
-            theme_config.px_unfocus_topleft);
+                theme_config.px_unfocus_topleft);
         XClearWindow(plugin.ob_display, self->top_left);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->top_right,
-            theme_config.px_unfocus_topright);
+                theme_config.px_unfocus_topright);
         XClearWindow(plugin.ob_display, self->top_right);
 
         XSetWindowBackgroundPixmap(plugin.ob_display, self->bottom_left,
-            theme_config.px_unfocus_bottomleft);
+                theme_config.px_unfocus_bottomleft);
         XClearWindow(plugin.ob_display, self->bottom_left);
         XSetWindowBackgroundPixmap(plugin.ob_display, self->bottom_right,
-            theme_config.px_unfocus_bottomright);
+                theme_config.px_unfocus_bottomright);
         XClearWindow(plugin.ob_display, self->bottom_right);
 
         XSetWindowBackground(plugin.ob_display, self->title, 0x00ffff);
         XClearWindow(plugin.ob_display, self->title);
         XSetWindowBackground(plugin.ob_display, self->background, 0);
         XClearWindow(plugin.ob_display, self->background);
-      }
+    }
     XFlush(plugin.ob_display);
-  }
+}
 
 void frame_set_hover_flag(gpointer self, ObFrameButton button)
-  {
-    if (OBCONCEPTFRAME(self)->hover_flag != button)
-      {
+{
+    if (OBCONCEPTFRAME(self)->hover_flag != button) {
         OBCONCEPTFRAME(self)->hover_flag = button;
         frame_update_skin(self);
-      }
-  }
+    }
+}
 
 void frame_set_press_flag(gpointer self, ObFrameButton button)
-  {
-    if (OBCONCEPTFRAME(self)->press_flag != button)
-      {
+{
+    if (OBCONCEPTFRAME(self)->press_flag != button) {
         OBCONCEPTFRAME(self)->press_flag = button;
         frame_update_skin(self);
-      }
-  }
+    }
+}
 
 Window frame_get_window(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->window;
-  }
+}
 
 Strut frame_get_size(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->size;
-  }
+}
 
 gint frame_get_decorations(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->decorations;
-  }
+}
 
 gboolean frame_is_visible(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->visible;
-  }
+}
 
 gboolean frame_is_max_horz(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->max_horz;
-  }
+}
 
 gboolean frame_is_max_vert(gpointer self)
-  {
+{
     return OBCONCEPTFRAME(self)->max_vert;
-  }
+}
 
 static gulong frame_animate_iconify_time_left(gpointer _self,
-    const GTimeVal *now)
-  {
+        const GTimeVal *now)
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     glong sec, usec;
     sec = self->iconify_animation_end.tv_sec - now->tv_sec;
     usec = self->iconify_animation_end.tv_usec - now->tv_usec;
-    if (usec < 0)
-      {
+    if (usec < 0) {
         usec += G_USEC_PER_SEC;
         sec--;
-      }
+    }
     /* no negative values */
     return MAX(sec * G_USEC_PER_SEC + usec, 0);
-  }
+}
 
 gboolean frame_animate_iconify(gpointer p)
-  {
+{
     ObConceptFrame *self = p;
     gint x, y, w, h;
     gint iconx, icony, iconw;
@@ -944,23 +912,21 @@ gboolean frame_animate_iconify(gpointer p)
     gulong time;
     gboolean iconifying;
 
-    if (self->client->icon_geometry.width == 0)
-      {
+    if (self->client->icon_geometry.width == 0) {
         /* there is no icon geometry set so just go straight down */
         Rect
-            *a =
-                screen_physical_area_monitor(screen_find_monitor(&self->window_area));
+                *a =
+                        screen_physical_area_monitor(screen_find_monitor(&self->window_area));
         iconx = self->window_area.x + self->window_area.width / 2 + 32;
         icony = a->y + a->width;
         iconw = 64;
         g_free(a);
-      }
-    else
-      {
+    }
+    else {
         iconx = self->client->icon_geometry.x;
         icony = self->client->icon_geometry.y;
         iconw = self->client->icon_geometry.width;
-      }
+    }
 
     iconifying = self->iconify_animation_going > 0;
 
@@ -968,25 +934,22 @@ gboolean frame_animate_iconify(gpointer p)
     g_get_current_time(&now);
     time = frame_animate_iconify_time_left(self, &now);
 
-    if (time == 0 || iconifying)
-      {
+    if (time == 0 || iconifying) {
         /* start where the frame is supposed to be */
         x = self->window_area.x;
         y = self->window_area.y;
         w = self->window_area.width;
         h = self->window_area.height;
-      }
-    else
-      {
+    }
+    else {
         /* start at the icon */
         x = iconx;
         y = icony;
         w = iconw;
         h = self->size.top; /* just the titlebar */
-      }
+    }
 
-    if (time > 0)
-      {
+    if (time > 0) {
         glong dx, dy, dw;
         glong elapsed;
 
@@ -994,34 +957,32 @@ gboolean frame_animate_iconify(gpointer p)
         dy = self->window_area.y - icony;
         dw = self->window_area.width - iconw;
         /* if restoring, we move in the opposite direction */
-        if (!iconifying)
-          {
+        if (!iconifying) {
             dx = -dx;
             dy = -dy;
             dw = -dw;
-          }
+        }
 
         elapsed = FRAME_ANIMATE_ICONIFY_TIME - time;
         x = x - (dx * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         y = y - (dy * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         w = w - (dw * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         h = self->size.top; /* just the titlebar */
-      }
+    }
 
     if (time == 0)
-      frame_end_iconify_animation(self);
-    else
-      {
+        frame_end_iconify_animation(self);
+    else {
         XMoveResizeWindow(plugin.ob_display, self->window, x, y, w, h);
         XFlush(plugin.ob_display);
-      }
+    }
 
     return time > 0; /* repeat until we're out of time */
-  }
+}
 
 /* change the cursor */
 void frame_adjust_cursors(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
 
     XSetWindowAttributes a;
@@ -1049,151 +1010,149 @@ void frame_adjust_cursors(gpointer _self)
     a.cursor = ob_cursor(OB_CURSOR_SOUTHEAST);
     XChangeWindowAttributes(plugin.ob_display, self->bottom_right, CWCursor, &a);
 
-  }
+}
 
 void frame_adjust_client_area(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* adjust the window which is there to prevent flashing on unmap */
     XMoveResizeWindow(plugin.ob_display, self->background, 0, 0,
-        self->client->area.width, self->client->area.height);
-  }
+            self->client->area.width, self->client->area.height);
+}
 
 void frame_adjust_state(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->need_render = TRUE;
     frame_update_skin(self);
-  }
+}
 
 void frame_adjust_focus(gpointer _self, gboolean hilite)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->focused = hilite;
     self->need_render = TRUE;
     frame_update_skin(self);
     XFlush(plugin.ob_display);
-  }
+}
 
 void frame_adjust_title(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->need_render = TRUE;
     frame_update_skin(self);
-  }
+}
 
 void frame_adjust_icon(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->need_render = TRUE;
     frame_update_skin(self);
-  }
+}
 
 /* is there anything present between us and the label? */
 static gboolean is_button_present(ObConceptFrame *_self, const gchar *lc,
-    gint dir)
-  {
+        gint dir)
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir)
-      {
+    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir) {
         if (*lc == ' ')
-          continue; /* it was invalid */
+            continue; /* it was invalid */
         if (*lc == 'N' && self->decorations & OB_FRAME_DECOR_ICON)
-          return TRUE;
+            return TRUE;
         if (*lc == 'D' && self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
-          return TRUE;
+            return TRUE;
         if (*lc == 'S' && self->decorations & OB_FRAME_DECOR_SHADE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'I' && self->decorations & OB_FRAME_DECOR_ICONIFY)
-          return TRUE;
+            return TRUE;
         if (*lc == 'M' && self->decorations & OB_FRAME_DECOR_MAXIMIZE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'C' && self->decorations & OB_FRAME_DECOR_CLOSE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'L')
-          return FALSE;
-      }
+            return FALSE;
+    }
     return FALSE;
-  }
+}
 
 void flash_done(gpointer data)
-  {
+{
     ObConceptFrame *self = data;
 
     if (self->focused != self->flash_on)
-      frame_adjust_focus(self, self->focused);
-  }
+        frame_adjust_focus(self, self->focused);
+}
 
 gboolean flash_timeout(gpointer data)
-  {
+{
     ObConceptFrame *self = data;
     GTimeVal now;
 
     g_get_current_time(&now);
-    if (now.tv_sec > self->flash_end.tv_sec || (now.tv_sec
-        == self->flash_end.tv_sec && now.tv_usec >= self->flash_end.tv_usec))
-      self->flashing = FALSE;
+    if (now.tv_sec > self->flash_end.tv_sec
+            || (now.tv_sec == self->flash_end.tv_sec && now.tv_usec
+                    >= self->flash_end.tv_usec))
+        self->flashing = FALSE;
 
     if (!self->flashing)
-      return FALSE; /* we are done */
+        return FALSE; /* we are done */
 
     self->flash_on = !self->flash_on;
-    if (!self->focused)
-      {
+    if (!self->focused) {
         frame_adjust_focus(self, self->flash_on);
         self->focused = FALSE;
-      }
+    }
 
     return TRUE; /* go again */
-  }
-
-ObFramePlugin plugin =
-  { 0, //gpointer handler;
-      "libconcept.la", //gchar * filename;
-      "Concept", //gchar * name;
-      init, //gint (*init) (Display * display, gint screen);
-      0, frame_new, //gpointer (*frame_new) (struct _ObClient *c);
-      frame_free, //void (*frame_free) (gpointer self);
-      frame_show, //void (*frame_show) (gpointer self);
-      frame_hide, //void (*frame_hide) (gpointer self);
-      frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
-      frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
-      frame_grab, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
-      frame_ungrab, frame_context, //void (*frame_adjust_state) (gpointer self);
-      frame_set_is_visible, frame_set_is_focus, frame_set_is_max_vert,
-          frame_set_is_max_horz, frame_set_is_shaded,
-
-      frame_flash_start, frame_flash_stop, frame_begin_iconify_animation,
-          frame_end_iconify_animation, frame_iconify_animating,
-
-      frame_set_decorations,
-      /* This give the window area */
-      frame_get_window_area, frame_set_client_area,
-      /* Draw the frame */
-      frame_update_layout, frame_update_skin,
-
-      frame_set_hover_flag, frame_set_press_flag,
-
-      frame_get_window,
-
-      frame_get_size, frame_get_decorations,
-
-      frame_is_visible, frame_is_max_horz, frame_is_max_vert,
-
-      load_theme_config,
-
-      /* This fields are fill by openbox. */
-      0, //Display * ob_display;
-      0, //gint ob_screen;
-      0, //RrInstance *ob_rr_inst;
-      0, //gboolean config_theme_keepborder;
-      0, //struct _ObClient *focus_cycle_target;
-      0, //gchar *config_title_layout;
-      FALSE, //gboolean moveresize_in_progress;
-      0, //struct _ObMainLoop *ob_main_loop;
+}
+
+ObFramePlugin plugin = { 0, //gpointer handler;
+        "libconcept.la", //gchar * filename;
+        "Concept", //gchar * name;
+        init, //gint (*init) (Display * display, gint screen);
+        0, frame_new, //gpointer (*frame_new) (struct _ObClient *c);
+        frame_free, //void (*frame_free) (gpointer self);
+        frame_show, //void (*frame_show) (gpointer self);
+        frame_hide, //void (*frame_hide) (gpointer self);
+        frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
+        frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
+        frame_grab, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
+        frame_ungrab, frame_context, //void (*frame_adjust_state) (gpointer self);
+        frame_set_is_visible, frame_set_is_focus, frame_set_is_max_vert,
+                frame_set_is_max_horz, frame_set_is_shaded,
+
+        frame_flash_start, frame_flash_stop, frame_begin_iconify_animation,
+                frame_end_iconify_animation, frame_iconify_animating,
+
+        frame_set_decorations,
+        /* This give the window area */
+        frame_get_window_area, frame_set_client_area,
+        /* Draw the frame */
+        frame_update_layout, frame_update_skin,
+
+        frame_set_hover_flag, frame_set_press_flag,
+
+        frame_get_window,
+
+        frame_get_size, frame_get_decorations,
+
+        frame_is_visible, frame_is_max_horz, frame_is_max_vert,
+
+        load_theme_config,
+
+        /* This fields are fill by openbox. */
+        0, //Display * ob_display;
+        0, //gint ob_screen;
+        0, //RrInstance *ob_rr_inst;
+        0, //gboolean config_theme_keepborder;
+        0, //struct _ObClient *focus_cycle_target;
+        0, //gchar *config_title_layout;
+        FALSE, //gboolean moveresize_in_progress;
+        0, //struct _ObMainLoop *ob_main_loop;
 };
 
 ObFramePlugin * get_info()
-  {
+{
     return &plugin;
-  }
+}
diff --git a/engines/concept/plugin.h b/engines/concept/plugin.h
index 1caf957..0f22499 100644
--- a/engines/concept/plugin.h
+++ b/engines/concept/plugin.h
@@ -26,15 +26,15 @@
 ObFrameThemeConfig theme_config;
 
 typedef enum {
-	OB_FRAME_STASE_IS_VISIBLE = 1 << 0,
-	OB_FRAME_STASE_IS_FOCUS = 1 << 1,
-	OB_FRAME_STASE_IS_MAX_VERT = 1 << 2,
-	OB_FRAME_STASE_IS_MAX_HORZ = 1 << 3,
-	OB_FRAME_STASE_IS_SHADED = 1 << 4
+    OB_FRAME_STASE_IS_VISIBLE = 1 << 0,
+    OB_FRAME_STASE_IS_FOCUS = 1 << 1,
+    OB_FRAME_STASE_IS_MAX_VERT = 1 << 2,
+    OB_FRAME_STASE_IS_MAX_HORZ = 1 << 3,
+    OB_FRAME_STASE_IS_SHADED = 1 << 4
 } ObFrameStaseFlags;
 
 struct _ObConceptFrame
-  {
+{
     /* PUBLIC : */
 
     /* PRIVATE: */
@@ -56,7 +56,6 @@ struct _ObConceptFrame
     ObFrameButton hover_flag;
     ObFrameButton press_flag;
 
-
     ObStyle style;
 
     guint functions;
@@ -129,7 +128,7 @@ struct _ObConceptFrame
 
     ObFrameStaseFlags frame_stase_flags;
 
-  };
+};
 
 typedef struct _ObConceptFrame ObConceptFrame;
 
@@ -150,11 +149,11 @@ void frame_ungrab(gpointer self, GHashTable *);
 
 ObFrameContext frame_context(gpointer, Window, gint, gint);
 
-void frame_set_is_visible (gpointer, gboolean);
-void frame_set_is_focus (gpointer, gboolean);
-void frame_set_is_max_vert (gpointer, gboolean);
-void frame_set_is_max_horz (gpointer, gboolean);
-void frame_set_is_shaded (gpointer, gboolean);
+void frame_set_is_visible(gpointer, gboolean);
+void frame_set_is_focus(gpointer, gboolean);
+void frame_set_is_max_vert(gpointer, gboolean);
+void frame_set_is_max_horz(gpointer, gboolean);
+void frame_set_is_shaded(gpointer, gboolean);
 
 void frame_flash_start(gpointer self);
 void frame_flash_stop(gpointer self);
@@ -163,27 +162,26 @@ void frame_end_iconify_animation(gpointer self);
 gboolean frame_iconify_animating(gpointer _self);
 
 /* Set the layout wanted by client */
-void frame_update_state (gpointer, ObFrameState);
+void frame_update_state(gpointer, ObFrameState);
 /* This give the allowed area for client window */
-Rect frame_get_window_area (gpointer);
-void frame_set_client_area (gpointer, Rect);
+Rect frame_get_window_area(gpointer);
+void frame_set_client_area(gpointer, Rect);
 /* Draw the frame */
-void frame_update_layout (gpointer, gboolean, gboolean);
-void frame_update_skin (gpointer);
+void frame_update_layout(gpointer, gboolean, gboolean);
+void frame_update_skin(gpointer);
 
 void frame_set_hover_flag(gpointer, ObFrameButton);
 void frame_set_press_flag(gpointer, ObFrameButton);
 
-Window frame_get_window (gpointer);
-
-Strut frame_get_size (gpointer);
+Window frame_get_window(gpointer);
 
-gint frame_get_decorations (gpointer);
+Strut frame_get_size(gpointer);
 
-gboolean frame_is_visible (gpointer);
-gboolean frame_is_max_horz (gpointer);
-gboolean frame_is_max_vert (gpointer);
+gint frame_get_decorations(gpointer);
 
+gboolean frame_is_visible(gpointer);
+gboolean frame_is_max_horz(gpointer);
+gboolean frame_is_max_vert(gpointer);
 
 /* Internal function */
 void flash_done(gpointer data);
@@ -193,7 +191,6 @@ void free_theme_statics(gpointer self);
 gboolean frame_animate_iconify(gpointer self);
 void frame_adjust_cursors(gpointer self);
 
-
 /* Global for frame_concept_render.c only */
 extern ObFramePlugin plugin;
 #define OBCONCEPTFRAME(x) ((ObConceptFrame *)(x))
diff --git a/engines/concept2/frame_concept2_config.c b/engines/concept2/frame_concept2_config.c
index 2e18e05..de77cc8 100644
--- a/engines/concept2/frame_concept2_config.c
+++ b/engines/concept2/frame_concept2_config.c
@@ -37,184 +37,169 @@ static XrmDatabase loaddb(const gchar *name, gchar **path);
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value);
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value);
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value);
+        const gchar *rname, RrColor **value);
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans);
+        const gchar *rname, RrAppearance *value, gboolean allow_trans);
 static int parse_inline_number(const char *p);
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data);
 static void set_default_appearance(RrAppearance *a);
 
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font)
-  {
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font)
+{
     gchar *str;
 
-    if (!read_int (db, "concept.border_width", &theme_config.border_width))
-      {
+    if (!read_int(db, "concept.border_width", &theme_config.border_width)) {
         theme_config.border_width = 2;
-      }
-    if (!read_int (db, "concept.left_width", &theme_config.left_width))
-      {
+    }
+    if (!read_int(db, "concept.left_width", &theme_config.left_width)) {
         theme_config.left_width = 15;
-      }
+    }
     if (!read_color(db, inst, "concept.focus_border_color",
-        &theme_config.focus_border_color))
-    {
-      theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.focus_border_color)) {
+        theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
     }
 
     if (!read_color(db, inst, "concept.focus_corner_color",
-        &theme_config.focus_corner_color))
-    {
-      theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.focus_corner_color)) {
+        theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
     }
 
     if (!read_color(db, inst, "concept.unfocus_border_color",
-        &theme_config.unfocus_border_color))
-    {
-      theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.unfocus_border_color)) {
+        theme_config.focus_border_color = RrColorNew(inst, 0, 0, 0);
     }
 
     if (!read_color(db, inst, "concept.unfocus_corner_color",
-        &theme_config.unfocus_corner_color))
-    {
-      theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
+            &theme_config.unfocus_corner_color)) {
+        theme_config.focus_corner_color = RrColorNew(inst, 0, 0, 0);
     }
 
     theme_config.inst = inst;
     theme_config.name = g_strdup(name ? name : DEFAULT_THEME);
 
     return 1;
-  }
+}
 
 static XrmDatabase loaddb(const gchar *name, gchar **path)
-  {
+{
     GSList *it;
     XrmDatabase db = NULL;
     gchar *s;
 
-    if (name[0] == '/')
-      {
+    if (name[0] == '/') {
         s = g_build_filename(name, "openbox-3", "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
-      }
-    else
-      {
+    }
+    else {
         /* XXX backwards compatibility, remove me sometime later */
         s = g_build_filename(g_get_home_dir(), ".themes", name, "openbox-3",
-            "themerc", NULL);
+                "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
 
-        for (it = parse_xdg_data_dir_paths(); !db && it; it = g_slist_next(it))
-          {
+        for (it = parse_xdg_data_dir_paths(); !db && it; it = g_slist_next(it)) {
             s = g_build_filename(it->data, "themes", name, "openbox-3",
-                "themerc", NULL);
+                    "themerc", NULL);
             if ((db = XrmGetFileDatabase(s)))
-              *path = g_path_get_dirname(s);
+                *path = g_path_get_dirname(s);
             g_free(s);
-          }
-      }
+        }
+    }
 
-    if (db == NULL)
-      {
+    if (db == NULL) {
         s = g_build_filename(name, "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
-      }
+    }
 
     return db;
-  }
+}
 
 static gchar *create_class_name(const gchar *rname)
-  {
+{
     gchar *rclass = g_strdup(rname);
     gchar *p = rclass;
 
-    while (TRUE)
-      {
+    while (TRUE) {
         *p = toupper(*p);
         p = strchr(p+1, '.');
         if (p == NULL)
-          break;
+            break;
         ++p;
         if (*p == '\0')
-          break;
-      }
+            break;
+    }
     return rclass;
-  }
+}
 
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype, *end;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = (gint)strtol(retvalue.addr, &end, 10);
         if (end != retvalue.addr)
-          ret = TRUE;
-      }
+            ret = TRUE;
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = retvalue.addr;
         ret = TRUE;
-      }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value)
-  {
+        const gchar *rname, RrColor **value)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         RrColor *c = RrColorParse(inst, retvalue.addr);
-        if (c != NULL)
-          {
+        if (c != NULL) {
             *value = c;
             ret = TRUE;
-          }
-      }
+        }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
-  {
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
+{
     gboolean ret = FALSE;
     gchar *s;
     gint hx, hy; /* ignored */
@@ -222,89 +207,82 @@ static gboolean read_mask(const RrInstance *inst, const gchar *path,
     guchar *b;
 
     s = g_build_filename(path, maskname, NULL);
-    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess)
-      {
+    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) {
         ret = TRUE;
         *value = RrPixmapMaskNew(inst, w, h, (gchar*)b);
         XFree(b);
-      }
+    }
     g_free(s);
 
     return ret;
-  }
+}
 
 static void parse_appearance(gchar *tex, RrSurfaceColorType *grad,
-    RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
-    gboolean *border, gboolean allow_trans)
-  {
+        RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
+        gboolean *border, gboolean allow_trans)
+{
     gchar *t;
 
     /* convert to all lowercase */
     for (t = tex; *t != '\0'; ++t)
-      *t = g_ascii_tolower(*t);
+        *t = g_ascii_tolower(*t);
 
-    if (allow_trans && strstr(tex, "parentrelative") != NULL)
-      {
+    if (allow_trans && strstr(tex, "parentrelative") != NULL) {
         *grad = RR_SURFACE_PARENTREL;
-      }
-    else
-      {
-        if (strstr(tex, "gradient") != NULL)
-          {
+    }
+    else {
+        if (strstr(tex, "gradient") != NULL) {
             if (strstr(tex, "crossdiagonal") != NULL)
-              *grad = RR_SURFACE_CROSS_DIAGONAL;
+                *grad = RR_SURFACE_CROSS_DIAGONAL;
             else if (strstr(tex, "pyramid") != NULL)
-              *grad = RR_SURFACE_PYRAMID;
+                *grad = RR_SURFACE_PYRAMID;
             else if (strstr(tex, "mirrorhorizontal") != NULL)
-              *grad = RR_SURFACE_MIRROR_HORIZONTAL;
+                *grad = RR_SURFACE_MIRROR_HORIZONTAL;
             else if (strstr(tex, "horizontal") != NULL)
-              *grad = RR_SURFACE_HORIZONTAL;
+                *grad = RR_SURFACE_HORIZONTAL;
             else if (strstr(tex, "splitvertical") != NULL)
-              *grad = RR_SURFACE_SPLIT_VERTICAL;
+                *grad = RR_SURFACE_SPLIT_VERTICAL;
             else if (strstr(tex, "vertical") != NULL)
-              *grad = RR_SURFACE_VERTICAL;
+                *grad = RR_SURFACE_VERTICAL;
             else
-              *grad = RR_SURFACE_DIAGONAL;
-          }
-        else
-          {
+                *grad = RR_SURFACE_DIAGONAL;
+        }
+        else {
             *grad = RR_SURFACE_SOLID;
-          }
-      }
+        }
+    }
 
     if (strstr(tex, "sunken") != NULL)
-      *relief = RR_RELIEF_SUNKEN;
+        *relief = RR_RELIEF_SUNKEN;
     else if (strstr(tex, "flat") != NULL)
-      *relief = RR_RELIEF_FLAT;
+        *relief = RR_RELIEF_FLAT;
     else if (strstr(tex, "raised") != NULL)
-      *relief = RR_RELIEF_RAISED;
+        *relief = RR_RELIEF_RAISED;
     else
-      *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
-          : RR_RELIEF_RAISED;
+        *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
+                : RR_RELIEF_RAISED;
 
     *border = FALSE;
-    if (*relief == RR_RELIEF_FLAT)
-      {
+    if (*relief == RR_RELIEF_FLAT) {
         if (strstr(tex, "border") != NULL)
-          *border = TRUE;
-      }
-    else
-      {
+            *border = TRUE;
+    }
+    else {
         if (strstr(tex, "bevel2") != NULL)
-          *bevel = RR_BEVEL_2;
+            *bevel = RR_BEVEL_2;
         else
-          *bevel = RR_BEVEL_1;
-      }
+            *bevel = RR_BEVEL_1;
+    }
 
     if (strstr(tex, "interlaced") != NULL)
-      *interlaced = TRUE;
+        *interlaced = TRUE;
     else
-      *interlaced = FALSE;
-  }
+        *interlaced = FALSE;
+}
 
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans)
-  {
+        const gchar *rname, RrAppearance *value, gboolean allow_trans)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *cname, *ctoname, *bcname, *icname, *hname, *sname;
@@ -323,32 +301,29 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     ctosplitname = g_strconcat(rname, ".colorTo.splitTo", NULL);
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         parse_appearance(retvalue.addr, &value->surface.grad,
-            &value->surface.relief, &value->surface.bevel,
-            &value->surface.interlaced, &value->surface.border, allow_trans);
+                &value->surface.relief, &value->surface.bevel,
+                &value->surface.interlaced, &value->surface.border, allow_trans);
         if (!read_color(db, inst, cname, &value->surface.primary))
-          value->surface.primary = RrColorNew(inst, 0, 0, 0);
+            value->surface.primary = RrColorNew(inst, 0, 0, 0);
         if (!read_color(db, inst, ctoname, &value->surface.secondary))
-          value->surface.secondary = RrColorNew(inst, 0, 0, 0);
+            value->surface.secondary = RrColorNew(inst, 0, 0, 0);
         if (value->surface.border)
-          if (!read_color(db, inst, bcname, &value->surface.border_color))
-            value->surface.border_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, bcname, &value->surface.border_color))
+                value->surface.border_color = RrColorNew(inst, 0, 0, 0);
         if (value->surface.interlaced)
-          if (!read_color(db, inst, icname, &value->surface.interlace_color))
-            value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, icname, &value->surface.interlace_color))
+                value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
         if (read_int(db, hname, &i) && i >= 0)
-          value->surface.bevel_light_adjust = i;
+            value->surface.bevel_light_adjust = i;
         if (read_int(db, sname, &i) && i >= 0 && i <= 256)
-          value->surface.bevel_dark_adjust = i;
+            value->surface.bevel_dark_adjust = i;
 
-        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL)
-          {
+        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL) {
             gint r, g, b;
 
-            if (!read_color(db, inst, csplitname, &value->surface.split_primary))
-              {
+            if (!read_color(db, inst, csplitname, &value->surface.split_primary)) {
                 r = value->surface.primary->r;
                 r += r >> 2;
                 g = value->surface.primary->g;
@@ -356,17 +331,16 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.primary->b;
                 b += b >> 2;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_primary = RrColorNew(inst, r, g, b);
-              }
+            }
 
             if (!read_color(db, inst, ctosplitname,
-                &value->surface.split_secondary))
-              {
+                    &value->surface.split_secondary)) {
                 r = value->surface.secondary->r;
                 r += r >> 4;
                 g = value->surface.secondary->g;
@@ -374,17 +348,17 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.secondary->b;
                 b += b >> 4;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_secondary = RrColorNew(inst, r, g, b);
-              }
-          }
+            }
+        }
 
         ret = TRUE;
-      }
+    }
 
     g_free(ctosplitname);
     g_free(csplitname);
@@ -396,25 +370,24 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     g_free(cname);
     g_free(rclass);
     return ret;
-  }
+}
 
 static int parse_inline_number(const char *p)
-  {
+{
     int neg = 1;
     int res = 0;
-    if (*p == '-')
-      {
+    if (*p == '-') {
         neg = -1;
         ++p;
-      }
+    }
     for (; isdigit(*p); ++p)
-      res = res * 10 + *p - '0';
+        res = res * 10 + *p - '0';
     res *= neg;
     return res;
-  }
+}
 
 static void set_default_appearance(RrAppearance *a)
-  {
+{
     a->surface.grad = RR_SURFACE_SOLID;
     a->surface.relief = RR_RELIEF_FLAT;
     a->surface.bevel = RR_BEVEL_1;
@@ -422,28 +395,27 @@ static void set_default_appearance(RrAppearance *a)
     a->surface.border = FALSE;
     a->surface.primary = RrColorNew(a->inst, 0, 0, 0);
     a->surface.secondary = RrColorNew(a->inst, 0, 0, 0);
-  }
+}
 
 /* Reads the output from gimp's C-Source file format into valid RGBA data for
  an RrTextureRGBA. */
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data)
-  {
+{
     RrPixel32 *im, *p;
     gint i;
 
     p = im = g_memdup(data, width * height * sizeof(RrPixel32));
 
-    for (i = 0; i < width * height; ++i)
-      {
+    for (i = 0; i < width * height; ++i) {
         guchar a = ((*p >> 24) & 0xff);
         guchar b = ((*p >> 16) & 0xff);
         guchar g = ((*p >> 8) & 0xff);
         guchar r = ((*p >> 0) & 0xff);
 
         *p = ((r << RrDefaultRedOffset) + (g << RrDefaultGreenOffset) + (b
-            << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
+                << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
         p++;
-      }
+    }
 
     return im;
-  }
+}
diff --git a/engines/concept2/frame_concept2_config.h b/engines/concept2/frame_concept2_config.h
index 869d944..d7d18b4 100644
--- a/engines/concept2/frame_concept2_config.h
+++ b/engines/concept2/frame_concept2_config.h
@@ -25,7 +25,7 @@
 G_BEGIN_DECLS
 
 struct _ObFrameThemeConfig
-  {
+{
     const RrInstance *inst;
 
     gint border_width;
@@ -36,16 +36,16 @@ struct _ObFrameThemeConfig
     RrColor * unfocus_corner_color;
 
     gchar *name;
-  };
+};
 
 typedef struct _ObFrameThemeConfig ObFrameThemeConfig;
 
 /*! The font values are all optional. If a NULL is used for any of them, then
  the default font will be used. */
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font);
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font);
 
 G_END_DECLS
 
diff --git a/engines/concept2/frame_concept2_plugin.c b/engines/concept2/frame_concept2_plugin.c
index d643b82..9c850e7 100644
--- a/engines/concept2/frame_concept2_plugin.c
+++ b/engines/concept2/frame_concept2_plugin.c
@@ -35,13 +35,13 @@
 #include "render/theme.h"
 
 typedef enum
-  {
+{
     OB_FLAG_MAX = 1 << 0,
     OB_FLAG_CLOSE = 1 << 1,
     OB_FLAG_DESK = 1 << 2,
     OB_FLAG_SHADE = 1 << 3,
     OB_FLAG_ICONIFY = 1 << 4
-  } ObFrameFlags;
+} ObFrameFlags;
 
 #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
                          ButtonPressMask | ButtonReleaseMask | \
@@ -56,42 +56,42 @@ typedef enum
 #define FRAME_HANDLE_Y(f) (f->size.top + f->client->area.height + f->cbwidth_b)
 
 Window createWindow(Window parent, Visual *visual, gulong mask,
-    XSetWindowAttributes *attrib)
-  {
+        XSetWindowAttributes *attrib)
+{
     return XCreateWindow(plugin.ob_display, parent, 0, 0, 1, 1, 0, (visual ? 32
-        : RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
-        : RrVisual(plugin.ob_rr_inst)), mask, attrib);
+            : RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
+            : RrVisual(plugin.ob_rr_inst)), mask, attrib);
 
-  }
+}
 
 Visual *check_32bit_client(ObClient *c)
-  {
+{
     XWindowAttributes wattrib;
     Status ret;
 
     /* we're already running at 32 bit depth, yay. we don't need to use their
      visual */
     if (RrDepth(plugin.ob_rr_inst) == 32)
-      return NULL;
+        return NULL;
 
     ret = XGetWindowAttributes(plugin.ob_display, c->window, &wattrib);
     g_assert(ret != BadDrawable);
     g_assert(ret != BadWindow);
 
     if (wattrib.depth == 32)
-      return wattrib.visual;
+        return wattrib.visual;
     return NULL;
-  }
+}
 
 /* Not used */
 gint init(Display * display, gint screen)
-  {
+{
     plugin.ob_display = display;
     plugin.ob_screen = screen;
-  }
+}
 
 gpointer frame_new(struct _ObClient * client)
-  {
+{
     XSetWindowAttributes attrib;
     gulong mask;
     ObConceptFrame *self;
@@ -105,35 +105,32 @@ gpointer frame_new(struct _ObClient * client)
     /* create the non-visible decor windows */
 
     mask = 0;
-    if (visual)
-      {
+    if (visual) {
         /* client has a 32-bit visual */
         mask |= CWColormap | CWBackPixel | CWBorderPixel;
         /* create a colormap with the visual */
         OBCONCEPTFRAME(self)->colormap = attrib.colormap = XCreateColormap(
-            plugin.ob_display, RootWindow(plugin.ob_display, plugin.ob_screen),
-            visual, AllocNone);
+                plugin.ob_display, RootWindow(plugin.ob_display,
+                        plugin.ob_screen), visual, AllocNone);
         attrib.background_pixel = BlackPixel(plugin.ob_display,
-            plugin.ob_screen);
+                plugin.ob_screen);
         attrib.border_pixel = BlackPixel(plugin.ob_display, plugin.ob_screen);
-      }
+    }
     self->window = createWindow(
-        RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask, &attrib);
-
+            RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask,
+            &attrib);
 
     /* create the visible decor windows */
 
     mask = 0;
-    if (visual)
-      {
+    if (visual) {
         /* client has a 32-bit visual */
         mask |= CWColormap | CWBackPixel | CWBorderPixel;
         attrib.colormap = RrColormap(plugin.ob_rr_inst);
-      }
+    }
 
     self->background = createWindow(self->window, NULL, mask, &attrib);
 
-
     mask |= CWEventMask;
     attrib.event_mask = ELEMENT_EVENTMASK;
 
@@ -173,26 +170,30 @@ gpointer frame_new(struct _ObClient * client)
     set_theme_statics(self);
 
     return (ObFrame*)self;
-  }
+}
 
 void set_theme_statics(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* do this before changing the frame's status like max_horz max_vert */
 
     XResizeWindow(plugin.ob_display, self->top_left, 15,
-        theme_config.border_width);
+            theme_config.border_width);
     XResizeWindow(plugin.ob_display, self->top_right, 15,
-        theme_config.border_width);
+            theme_config.border_width);
     XResizeWindow(plugin.ob_display, self->bottom_left, 15,
-        theme_config.border_width);
+            theme_config.border_width);
     XResizeWindow(plugin.ob_display, self->bottom_right, 15,
-        theme_config.border_width);
-
-    XResizeWindow(plugin.ob_display, self->left_close, theme_config.left_width, 15);
-    XResizeWindow(plugin.ob_display, self->left_iconify, theme_config.left_width, 15);
-    XResizeWindow(plugin.ob_display, self->left_maximize, theme_config.left_width, 15);
-    XResizeWindow(plugin.ob_display, self->left_shade, theme_config.left_width, 15);
+            theme_config.border_width);
+
+    XResizeWindow(plugin.ob_display, self->left_close, theme_config.left_width,
+            15);
+    XResizeWindow(plugin.ob_display, self->left_iconify,
+            theme_config.left_width, 15);
+    XResizeWindow(plugin.ob_display, self->left_maximize,
+            theme_config.left_width, 15);
+    XResizeWindow(plugin.ob_display, self->left_shade, theme_config.left_width,
+            15);
     XResizeWindow(plugin.ob_display, self->handle, theme_config.left_width, 15);
 
     XMoveWindow(plugin.ob_display, self->left_close, 0, 0);
@@ -201,29 +202,28 @@ void set_theme_statics(gpointer _self)
     XMoveWindow(plugin.ob_display, self->left_shade, 0, 45);
     XMoveWindow(plugin.ob_display, self->handle, 0, 60);
 
-  }
+}
 
 void free_theme_statics(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-  }
+}
 
 void frame_free(gpointer self)
-  {
+{
     free_theme_statics(OBCONCEPTFRAME(self));
     XDestroyWindow(plugin.ob_display, OBCONCEPTFRAME(self)->window);
     if (OBCONCEPTFRAME(self)->colormap)
-      XFreeColormap(plugin.ob_display, OBCONCEPTFRAME(self)->colormap);
+        XFreeColormap(plugin.ob_display, OBCONCEPTFRAME(self)->colormap);
     g_free(self);
-  }
+}
 
 void frame_show(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-    if (!self->visible)
-      {
+    if (!self->visible) {
         self->visible = TRUE;
-        frame_update_skin (self);
+        frame_update_skin(self);
         /* Grab the server to make sure that the frame window is mapped before
          the client gets its MapNotify, i.e. to make sure the client is
          _visible_ when it gets MapNotify. */
@@ -231,75 +231,74 @@ void frame_show(gpointer _self)
         XMapWindow(plugin.ob_display, self->client->window);
         XMapWindow(plugin.ob_display, self->window);
         grab_server(FALSE);
-      }
-  }
+    }
+}
 
 void frame_hide(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-    if (self->visible)
-      {
+    if (self->visible) {
         self->visible = FALSE;
         if (!frame_iconify_animating(self))
-          XUnmapWindow(plugin.ob_display, self->window);
+            XUnmapWindow(plugin.ob_display, self->window);
         /* we unmap the client itself so that we can get MapRequest
          events, and because the ICCCM tells us to! */
         XUnmapWindow(plugin.ob_display, self->client->window);
         self->client->ignore_unmaps += 1;
-      }
-  }
+    }
+}
 
 void frame_adjust_theme(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     free_theme_statics(self);
     set_theme_statics(self);
-  }
+}
 
 void frame_adjust_shape(gpointer _self)
-  {
+{
 #ifdef SHAPE
     ObConceptFrame * self = (ObConceptFrame *) _self;
     gint num;
     XRectangle xrect[2];
 
     if (!self->client->shaped)
-      {
+    {
         /* clear the shape on the frame window */
         XShapeCombineMask(plugin.ob_display, self->window, ShapeBounding,
-            self->size.left,
-            self->size.top,
-            None, ShapeSet);
-      }
+                self->size.left,
+                self->size.top,
+                None, ShapeSet);
+    }
     else
-      {
+    {
         /* make the frame's shape match the clients */
         XShapeCombineShape(plugin.ob_display, self->window, ShapeBounding,
-            self->size.left,
-            self->size.top,
-            self->client->window,
-            ShapeBounding, ShapeSet);
+                self->size.left,
+                self->size.top,
+                self->client->window,
+                ShapeBounding, ShapeSet);
 
         num = 0;
         if (self->decorations)
-          {
+        {
             xrect[0].x = 0;
             xrect[0].y = 0;
             xrect[0].width = self->area.width;
             xrect[0].height = self->size.top;
             ++num;
-          }
+        }
 
         XShapeCombineRectangles(plugin.ob_display, self->window,
-            ShapeBounding, 0, 0, xrect, num,
-            ShapeUnion, Unsorted);
-      }
+                ShapeBounding, 0, 0, xrect, num,
+                ShapeUnion, Unsorted);
+    }
 #endif
-  }
+}
 
 void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
-    gboolean fake)
-  {
+        gboolean fake)
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
 
     /* do this before changing the frame's status like max_horz max_vert */
@@ -312,67 +311,63 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
     self->max_vert = self->client->max_vert;
     self->shaded = self->client->shaded;
 
-    if (self->decorations && !self->shaded)
-      {
+    if (self->decorations && !self->shaded) {
         self->cbwidth_l = theme_config.left_width;
         self->cbwidth_r = theme_config.border_width;
         self->cbwidth_t = theme_config.border_width;
         self->cbwidth_b = theme_config.border_width;
 
-        if (self->max_horz)
-          {
+        if (self->max_horz) {
             self->cbwidth_l = theme_config.left_width;
             self->cbwidth_r = 0;
-          }
+        }
 
-        if (self->max_vert)
-          {
+        if (self->max_vert) {
             self->cbwidth_b = 0;
             self->cbwidth_t = 0;
-          }
+        }
 
         STRUT_SET(self->size, self->cbwidth_l, self->cbwidth_t,
-            self->cbwidth_r, self->cbwidth_b);
+                self->cbwidth_r, self->cbwidth_b);
 
         RECT_SET_SIZE(self->area, self->client->area.width + self->size.left
-            + self->size.right, self->client->area.height + self->size.top
-            + self->size.bottom);
+                + self->size.right, self->client->area.height + self->size.top
+                + self->size.bottom);
 
         self->width = self->area.width;
 
-        if (!fake)
-          {
+        if (!fake) {
 
             XMoveResizeWindow(plugin.ob_display, self->top, 15, 0,
-                self->area.width - 30, theme_config.border_width);
+                    self->area.width - 30, theme_config.border_width);
             XMapWindow(plugin.ob_display, self->top);
 
             XMoveResizeWindow(plugin.ob_display, self->bottom, 15,
-                self->area.height - theme_config.border_width, self->area.width
-                    - 30, theme_config.border_width);
+                    self->area.height - theme_config.border_width,
+                    self->area.width - 30, theme_config.border_width);
             XMapWindow(plugin.ob_display, self->bottom);
 
             XMoveResizeWindow(plugin.ob_display, self->left, 0,
-                theme_config.border_width, theme_config.left_width,
-                self->area.height - 2*theme_config.border_width);
+                    theme_config.border_width, theme_config.left_width,
+                    self->area.height - 2*theme_config.border_width);
             XMapWindow(plugin.ob_display, self->left);
 
             XMoveResizeWindow(plugin.ob_display, self->right, self->area.width
-                - theme_config.border_width, theme_config.border_width,
-                theme_config.border_width, self->area.height - 2
-                    *theme_config.border_width);
+                    - theme_config.border_width, theme_config.border_width,
+                    theme_config.border_width, self->area.height - 2
+                            *theme_config.border_width);
             XMapWindow(plugin.ob_display, self->right);
 
             XMoveWindow(plugin.ob_display, self->top_left, 0, 0);
             XMapWindow(plugin.ob_display, self->top_left);
             XMoveWindow(plugin.ob_display, self->top_right, self->area.width
-                - 15, 0);
+                    - 15, 0);
             XMapWindow(plugin.ob_display, self->top_right);
             XMoveWindow(plugin.ob_display, self->bottom_left, 0,
-                self->area.height - theme_config.border_width);
+                    self->area.height - theme_config.border_width);
             XMapWindow(plugin.ob_display, self->bottom_left);
             XMoveWindow(plugin.ob_display, self->bottom_right, self->area.width
-                - 15, self->area.height - theme_config.border_width);
+                    - 15, self->area.height - theme_config.border_width);
             XMapWindow(plugin.ob_display, self->bottom_right);
 
             XMapWindow(plugin.ob_display, self->left_close);
@@ -387,27 +382,25 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
             frame_client_gravity(self, &self->area.x, &self->area.y);
 
             XMoveResizeWindow(plugin.ob_display, self->background,
-                theme_config.border_width, theme_config.border_width,
-                self->area.width - 2 * theme_config.border_width,
-                self->area.height - 2 * theme_config.border_width);
+                    theme_config.border_width, theme_config.border_width,
+                    self->area.width - 2 * theme_config.border_width,
+                    self->area.height - 2 * theme_config.border_width);
             XMapWindow(plugin.ob_display, self->background);
-          }
+        }
 
         XMoveWindow(plugin.ob_display, self->client->window, self->size.left,
-            self->size.top);
+                self->size.top);
         XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-            self->area.y, self->area.width, self->area.height);
-
+                self->area.y, self->area.width, self->area.height);
 
-      }
-    else if (self->shaded)
-      {
+    }
+    else if (self->shaded) {
         self->cbwidth_l = theme_config.left_width;
         self->cbwidth_r = 0;
         self->cbwidth_b = 0;
         self->cbwidth_t = 0;
         STRUT_SET(self->size, self->cbwidth_l, self->cbwidth_t,
-            self->cbwidth_r, self->cbwidth_b);
+                self->cbwidth_r, self->cbwidth_b);
 
         RECT_SET_SIZE(self->area, theme_config.left_width, self->area.height);
 
@@ -417,8 +410,7 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
         self->area.y = self->client->area.y;
         //frame_client_gravity(self, &self->area.x, &self->area.y);
         self->width = self->area.width;
-        if (!fake)
-          {
+        if (!fake) {
             XUnmapWindow(plugin.ob_display, self->top);
             XUnmapWindow(plugin.ob_display, self->bottom);
             XUnmapWindow(plugin.ob_display, self->right);
@@ -427,26 +419,27 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
             XUnmapWindow(plugin.ob_display, self->bottom_left);
             XUnmapWindow(plugin.ob_display, self->bottom_right);
 
-            XMoveResizeWindow(plugin.ob_display, self->left, 0, 0, theme_config.left_width, self->area.height);
+            XMoveResizeWindow(plugin.ob_display, self->left, 0, 0,
+                    theme_config.left_width, self->area.height);
             XMapWindow(plugin.ob_display, self->left);
-          }
+        }
 
-        XMoveWindow(plugin.ob_display, self->client->window, theme_config.left_width, 0);
+        XMoveWindow(plugin.ob_display, self->client->window,
+                theme_config.left_width, 0);
         XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-            self->area.y, self->area.width, self->area.height);
-      }
-    else
-      {
+                self->area.y, self->area.width, self->area.height);
+    }
+    else {
         self->cbwidth_l = 0;
         self->cbwidth_r = 0;
         self->cbwidth_b = 0;
         self->cbwidth_t = 0;
         STRUT_SET(self->size, self->cbwidth_l, self->cbwidth_t,
-            self->cbwidth_r, self->cbwidth_b);
+                self->cbwidth_r, self->cbwidth_b);
 
         RECT_SET_SIZE(self->area, self->client->area.width + self->size.left
-            + self->size.right, self->client->area.height + self->size.top
-            + self->size.bottom);
+                + self->size.right, self->client->area.height + self->size.top
+                + self->size.bottom);
 
         /* find the new coordinates, done after setting the frame.size, for
          frame_client_gravity. */
@@ -455,8 +448,7 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
         frame_client_gravity(self, &self->area.x, &self->area.y);
 
         self->width = self->area.width;
-        if (!fake)
-          {
+        if (!fake) {
             XUnmapWindow(plugin.ob_display, self->top);
             XUnmapWindow(plugin.ob_display, self->bottom);
             XUnmapWindow(plugin.ob_display, self->left);
@@ -469,19 +461,19 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
             XUnmapWindow(plugin.ob_display, self->handle);
 
             XMoveResizeWindow(plugin.ob_display, self->background, 0, 0,
-                self->area.width, self->area.height);
+                    self->area.width, self->area.height);
             XMapWindow(plugin.ob_display, self->background);
-          }
+        }
 
         XMoveWindow(plugin.ob_display, self->client->window, self->size.left,
-            self->size.top);
+                self->size.top);
         XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-            self->area.y, self->area.width, self->area.height);
-      }
-  }
+                self->area.y, self->area.width, self->area.height);
+    }
+}
 
 void frame_adjust_cursors(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
 
     XSetWindowAttributes a;
@@ -512,52 +504,53 @@ void frame_adjust_cursors(gpointer _self)
     a.cursor = ob_cursor(OB_CURSOR_POINTER);
     XChangeWindowAttributes(plugin.ob_display, self->left_close, CWCursor, &a);
     XChangeWindowAttributes(plugin.ob_display, self->left_iconify, CWCursor, &a);
-    XChangeWindowAttributes(plugin.ob_display, self->left_maximize, CWCursor, &a);
+    XChangeWindowAttributes(plugin.ob_display, self->left_maximize, CWCursor,
+            &a);
     XChangeWindowAttributes(plugin.ob_display, self->left_shade, CWCursor, &a);
     XChangeWindowAttributes(plugin.ob_display, self->handle, CWCursor, &a);
 
-  }
+}
 
 void frame_adjust_client_area(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* adjust the window which is there to prevent flashing on unmap */
     XMoveResizeWindow(plugin.ob_display, self->background, 0, 0,
-        self->client->area.width, self->client->area.height);
-  }
+            self->client->area.width, self->client->area.height);
+}
 
 void frame_adjust_state(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->need_render = TRUE;
     framerender_frame(self);
-  }
+}
 
 void frame_adjust_focus(gpointer _self, gboolean hilite)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->focused = hilite;
     self->need_render = TRUE;
     framerender_frame(self);
     XFlush(plugin.ob_display);
-  }
+}
 
 void frame_adjust_title(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->need_render = TRUE;
     framerender_frame(self);
-  }
+}
 
 void frame_adjust_icon(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->need_render = TRUE;
     framerender_frame(self);
-  }
+}
 
 void frame_grab_client(gpointer _self, GHashTable * map)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* DO NOT map the client window here. we used to do that, but it is bogus.
      we need to set up the client's dimensions and everything before we
@@ -574,7 +567,7 @@ void frame_grab_client(gpointer _self, GHashTable * map)
      for it.
      */
     if (ob_state() == OB_STATE_STARTING)
-      ++self->client->ignore_unmaps;
+        ++self->client->ignore_unmaps;
 
     /* select the event mask on the client's parent (to receive config/map
      req's) the ButtonPress is to catch clicks on the client border */
@@ -601,22 +594,21 @@ void frame_grab_client(gpointer _self, GHashTable * map)
 
     g_hash_table_insert(map, &self->handle, self->client);
 
-  }
+}
 
 void frame_release_client(gpointer _self, GHashTable * map)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     XEvent ev;
     gboolean reparent = TRUE;
 
     /* if there was any animation going on, kill it */
     ob_main_loop_timeout_remove_data(plugin.ob_main_loop,
-        frame_animate_iconify, self, FALSE);
+            frame_animate_iconify, self, FALSE);
 
     /* check if the app has already reparented its window away */
     while (XCheckTypedWindowEvent(plugin.ob_display, self->client->window,
-        ReparentNotify, &ev))
-      {
+            ReparentNotify, &ev)) {
         /* This check makes sure we don't catch our own reparent action to
          our frame window. This doesn't count as the app reparenting itself
          away of course.
@@ -624,22 +616,20 @@ void frame_release_client(gpointer _self, GHashTable * map)
          Reparent events that are generated by us are just discarded here.
          They are of no consequence to us anyhow.
          */
-        if (ev.xreparent.parent != self->window)
-          {
+        if (ev.xreparent.parent != self->window) {
             reparent = FALSE;
             XPutBackEvent(plugin.ob_display, &ev);
             break;
-          }
-      }
+        }
+    }
 
-    if (reparent)
-      {
+    if (reparent) {
         /* according to the ICCCM - if the client doesn't reparent itself,
          then we will reparent the window to root for them */
         XReparentWindow(plugin.ob_display, self->client->window, RootWindow(
-            plugin.ob_display, plugin.ob_screen), self->client->area.x,
-            self->client->area.y);
-      }
+                plugin.ob_display, plugin.ob_screen), self->client->area.x,
+                self->client->area.y);
+    }
 
     /* remove all the windows for the frame from the window_map */
     g_hash_table_remove(map, &self->window);
@@ -664,288 +654,286 @@ void frame_release_client(gpointer _self, GHashTable * map)
     g_hash_table_remove(map, &self->handle);
 
     ob_main_loop_timeout_remove_data(plugin.ob_main_loop, flash_timeout, self,
-        TRUE);
-  }
+            TRUE);
+}
 
 /* is there anything present between us and the label? */
 static gboolean is_button_present(ObConceptFrame *_self, const gchar *lc,
-    gint dir)
-  {
+        gint dir)
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
-    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir)
-      {
+    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir) {
         if (*lc == ' ')
-          continue; /* it was invalid */
+            continue; /* it was invalid */
         if (*lc == 'N' && self->decorations & OB_FRAME_DECOR_ICON)
-          return TRUE;
+            return TRUE;
         if (*lc == 'D' && self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
-          return TRUE;
+            return TRUE;
         if (*lc == 'S' && self->decorations & OB_FRAME_DECOR_SHADE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'I' && self->decorations & OB_FRAME_DECOR_ICONIFY)
-          return TRUE;
+            return TRUE;
         if (*lc == 'M' && self->decorations & OB_FRAME_DECOR_MAXIMIZE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'C' && self->decorations & OB_FRAME_DECOR_CLOSE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'L')
-          return FALSE;
-      }
+            return FALSE;
+    }
     return FALSE;
-  }
+}
 
 ObFrameContext frame_context(gpointer _self, Window win, gint x, gint y)
-  {
+{
     /* Here because client can be NULL */
     ObConceptFrame *self = OBCONCEPTFRAME(_self);
 
     if (win == self->window)
-      return OB_FRAME_CONTEXT_FRAME;
+        return OB_FRAME_CONTEXT_FRAME;
 
     if (win == self->bottom)
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
 
     if (win == self->bottom_left)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
 
     if (win == self->bottom_right)
-      return OB_FRAME_CONTEXT_BRCORNER;
+        return OB_FRAME_CONTEXT_BRCORNER;
 
     if (win == self->top)
-      return OB_FRAME_CONTEXT_TOP;
+        return OB_FRAME_CONTEXT_TOP;
 
     if (win == self->top_left)
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
 
     if (win == self->top_right)
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
 
     if (win == self->left_close)
-      return OB_FRAME_CONTEXT_CLOSE;
+        return OB_FRAME_CONTEXT_CLOSE;
     if (win == self->left_iconify)
-      return OB_FRAME_CONTEXT_ICONIFY;
+        return OB_FRAME_CONTEXT_ICONIFY;
     if (win == self->left_maximize)
-      return OB_FRAME_CONTEXT_MAXIMIZE;
+        return OB_FRAME_CONTEXT_MAXIMIZE;
     if (win == self->left_shade)
-      return OB_FRAME_CONTEXT_SHADE;
+        return OB_FRAME_CONTEXT_SHADE;
     if (win == self->handle)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
 
     if (win == self->left)
-      return OB_FRAME_CONTEXT_LEFT;
+        return OB_FRAME_CONTEXT_LEFT;
     if (win == self->right)
-      return OB_FRAME_CONTEXT_RIGHT;
+        return OB_FRAME_CONTEXT_RIGHT;
 
     return OB_FRAME_CONTEXT_NONE;
-  }
+}
 
 void frame_client_gravity(gpointer _self, gint *x, gint *y)
-  {
+{
     ObConceptFrame * self = OBCONCEPTFRAME(_self);
     /* horizontal */
-    switch (self->client->gravity)
-      {
+    switch (self->client->gravity) {
     default:
     case NorthWestGravity:
     case SouthWestGravity:
     case WestGravity:
-      break;
+        break;
 
     case NorthGravity:
     case SouthGravity:
     case CenterGravity:
-      /* the middle of the client will be the middle of the frame */
-      *x -= (self->size.right - self->size.left) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *x -= (self->size.right - self->size.left) / 2;
+        break;
 
     case NorthEastGravity:
     case SouthEastGravity:
     case EastGravity:
-      /* the right side of the client will be the right side of the frame */
-      *x -= self->size.right + self->size.left - self->client->border_width * 2;
-      break;
+        /* the right side of the client will be the right side of the frame */
+        *x -= self->size.right + self->size.left - self->client->border_width
+                * 2;
+        break;
 
     case ForgetGravity:
     case StaticGravity:
-      /* the client's position won't move */
-      *x -= self->size.left - self->client->border_width;
-      break;
-      }
+        /* the client's position won't move */
+        *x -= self->size.left - self->client->border_width;
+        break;
+    }
 
     /* vertical */
-    switch (self->client->gravity)
-      {
+    switch (self->client->gravity) {
     default:
     case NorthWestGravity:
     case NorthEastGravity:
     case NorthGravity:
-      break;
+        break;
 
     case CenterGravity:
     case EastGravity:
     case WestGravity:
-      /* the middle of the client will be the middle of the frame */
-      *y -= (self->size.bottom - self->size.top) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *y -= (self->size.bottom - self->size.top) / 2;
+        break;
 
     case SouthWestGravity:
     case SouthEastGravity:
     case SouthGravity:
-      /* the bottom of the client will be the bottom of the frame */
-      *y -= self->size.bottom + self->size.top - self->client->border_width * 2;
-      break;
+        /* the bottom of the client will be the bottom of the frame */
+        *y -= self->size.bottom + self->size.top - self->client->border_width
+                * 2;
+        break;
 
     case ForgetGravity:
     case StaticGravity:
-      /* the client's position won't move */
-      *y -= self->size.top - self->client->border_width;
-      break;
-      }
-  }
+        /* the client's position won't move */
+        *y -= self->size.top - self->client->border_width;
+        break;
+    }
+}
 
 void frame_frame_gravity(gpointer _self, gint *x, gint *y)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* horizontal */
-    switch (self->client->gravity)
-      {
+    switch (self->client->gravity) {
     default:
     case NorthWestGravity:
     case WestGravity:
     case SouthWestGravity:
-      break;
+        break;
     case NorthGravity:
     case CenterGravity:
     case SouthGravity:
-      /* the middle of the client will be the middle of the frame */
-      *x += (self->size.right - self->size.left) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *x += (self->size.right - self->size.left) / 2;
+        break;
     case NorthEastGravity:
     case EastGravity:
     case SouthEastGravity:
-      /* the right side of the client will be the right side of the frame */
-      *x += self->size.right + self->size.left - self->client->border_width * 2;
-      break;
+        /* the right side of the client will be the right side of the frame */
+        *x += self->size.right + self->size.left - self->client->border_width
+                * 2;
+        break;
     case StaticGravity:
     case ForgetGravity:
-      /* the client's position won't move */
-      *x += self->size.left - self->client->border_width;
-      break;
-      }
+        /* the client's position won't move */
+        *x += self->size.left - self->client->border_width;
+        break;
+    }
 
     /* vertical */
-    switch (self->client->gravity)
-      {
+    switch (self->client->gravity) {
     default:
     case NorthWestGravity:
     case NorthGravity:
     case NorthEastGravity:
-      break;
+        break;
     case WestGravity:
     case CenterGravity:
     case EastGravity:
-      /* the middle of the client will be the middle of the frame */
-      *y += (self->size.bottom - self->size.top) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *y += (self->size.bottom - self->size.top) / 2;
+        break;
     case SouthWestGravity:
     case SouthGravity:
     case SouthEastGravity:
-      /* the bottom of the client will be the bottom of the frame */
-      *y += self->size.bottom + self->size.top - self->client->border_width * 2;
-      break;
+        /* the bottom of the client will be the bottom of the frame */
+        *y += self->size.bottom + self->size.top - self->client->border_width
+                * 2;
+        break;
     case StaticGravity:
     case ForgetGravity:
-      /* the client's position won't move */
-      *y += self->size.top - self->client->border_width;
-      break;
-      }
-  }
+        /* the client's position won't move */
+        *y += self->size.top - self->client->border_width;
+        break;
+    }
+}
 
 void frame_rect_to_frame(gpointer _self, Rect *r)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     r->width += self->size.left + self->size.right;
     r->height += self->size.top + self->size.bottom;
     frame_client_gravity(self, &r->x, &r->y);
-  }
+}
 
 void frame_rect_to_client(gpointer _self, Rect *r)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     r->width -= self->size.left + self->size.right;
     r->height -= self->size.top + self->size.bottom;
     frame_frame_gravity(self, &r->x, &r->y);
-  }
+}
 
 void flash_done(gpointer data)
-  {
+{
     ObConceptFrame *self = data;
 
     if (self->focused != self->flash_on)
-      frame_adjust_focus(self, self->focused);
-  }
+        frame_adjust_focus(self, self->focused);
+}
 
 gboolean flash_timeout(gpointer data)
-  {
+{
     ObConceptFrame *self = data;
     GTimeVal now;
 
     g_get_current_time(&now);
-    if (now.tv_sec > self->flash_end.tv_sec || (now.tv_sec
-        == self->flash_end.tv_sec && now.tv_usec >= self->flash_end.tv_usec))
-      self->flashing = FALSE;
+    if (now.tv_sec > self->flash_end.tv_sec
+            || (now.tv_sec == self->flash_end.tv_sec && now.tv_usec
+                    >= self->flash_end.tv_usec))
+        self->flashing = FALSE;
 
     if (!self->flashing)
-      return FALSE; /* we are done */
+        return FALSE; /* we are done */
 
     self->flash_on = !self->flash_on;
-    if (!self->focused)
-      {
+    if (!self->focused) {
         frame_adjust_focus(self, self->flash_on);
         self->focused = FALSE;
-      }
+    }
 
     return TRUE; /* go again */
-  }
+}
 
 void frame_flash_start(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->flash_on = self->focused;
 
     if (!self->flashing)
-      ob_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
-          flash_timeout, self, g_direct_equal, flash_done);
+        ob_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
+                flash_timeout, self, g_direct_equal, flash_done);
     g_get_current_time(&self->flash_end);
     g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
 
     self->flashing = TRUE;
-  }
+}
 
 void frame_flash_stop(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     self->flashing = FALSE;
-  }
+}
 
 static gulong frame_animate_iconify_time_left(gpointer _self,
-    const GTimeVal *now)
-  {
+        const GTimeVal *now)
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     glong sec, usec;
     sec = self->iconify_animation_end.tv_sec - now->tv_sec;
     usec = self->iconify_animation_end.tv_usec - now->tv_usec;
-    if (usec < 0)
-      {
+    if (usec < 0) {
         usec += G_USEC_PER_SEC;
         sec--;
-      }
+    }
     /* no negative values */
     return MAX(sec * G_USEC_PER_SEC + usec, 0);
-  }
+}
 
 gboolean frame_animate_iconify(gpointer p)
-  {
+{
     ObConceptFrame *self = p;
     gint x, y, w, h;
     gint iconx, icony, iconw;
@@ -953,22 +941,20 @@ gboolean frame_animate_iconify(gpointer p)
     gulong time;
     gboolean iconifying;
 
-    if (self->client->icon_geometry.width == 0)
-      {
+    if (self->client->icon_geometry.width == 0) {
         /* there is no icon geometry set so just go straight down */
         Rect *a =
-            screen_physical_area_monitor(screen_find_monitor(&self->area));
+                screen_physical_area_monitor(screen_find_monitor(&self->area));
         iconx = self->area.x + self->area.width / 2 + 32;
         icony = a->y + a->width;
         iconw = 64;
         g_free(a);
-      }
-    else
-      {
+    }
+    else {
         iconx = self->client->icon_geometry.x;
         icony = self->client->icon_geometry.y;
         iconw = self->client->icon_geometry.width;
-      }
+    }
 
     iconifying = self->iconify_animation_going > 0;
 
@@ -976,25 +962,22 @@ gboolean frame_animate_iconify(gpointer p)
     g_get_current_time(&now);
     time = frame_animate_iconify_time_left(self, &now);
 
-    if (time == 0 || iconifying)
-      {
+    if (time == 0 || iconifying) {
         /* start where the frame is supposed to be */
         x = self->area.x;
         y = self->area.y;
         w = self->area.width;
         h = self->area.height;
-      }
-    else
-      {
+    }
+    else {
         /* start at the icon */
         x = iconx;
         y = icony;
         w = iconw;
         h = self->size.top; /* just the titlebar */
-      }
+    }
 
-    if (time > 0)
-      {
+    if (time > 0) {
         glong dx, dy, dw;
         glong elapsed;
 
@@ -1002,62 +985,59 @@ gboolean frame_animate_iconify(gpointer p)
         dy = self->area.y - icony;
         dw = self->area.width - self->bwidth * 2 - iconw;
         /* if restoring, we move in the opposite direction */
-        if (!iconifying)
-          {
+        if (!iconifying) {
             dx = -dx;
             dy = -dy;
             dw = -dw;
-          }
+        }
 
         elapsed = FRAME_ANIMATE_ICONIFY_TIME - time;
         x = x - (dx * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         y = y - (dy * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         w = w - (dw * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         h = self->size.top; /* just the titlebar */
-      }
+    }
 
     if (time == 0)
-      frame_end_iconify_animation(self);
-    else
-      {
+        frame_end_iconify_animation(self);
+    else {
         XMoveResizeWindow(plugin.ob_display, self->window, x, y, w, h);
         XFlush(plugin.ob_display);
-      }
+    }
 
     return time > 0; /* repeat until we're out of time */
-  }
+}
 
 void frame_end_iconify_animation(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     /* see if there is an animation going */
     if (self->iconify_animation_going == 0)
-      return;
+        return;
 
     if (!self->visible)
-      XUnmapWindow(plugin.ob_display, self->window);
-    else
-      {
+        XUnmapWindow(plugin.ob_display, self->window);
+    else {
         /* Send a ConfigureNotify when the animation is done, this fixes
          KDE's pager showing the window in the wrong place.  since the
          window is mapped at a different location and is then moved, we
          need to send the synthetic configurenotify, since apps may have
          read the position when the client mapped, apparently. */
         client_reconfigure(self->client, TRUE);
-      }
+    }
 
     /* we're not animating any more ! */
     self->iconify_animation_going = 0;
 
     XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-        self->area.y, self->area.width, self->area.height);
+            self->area.y, self->area.width, self->area.height);
     /* we delay re-rendering until after we're done animating */
     framerender_frame(self);
     XFlush(plugin.ob_display);
-  }
+}
 
 void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     gulong time;
     gboolean new_anim = FALSE;
@@ -1067,103 +1047,98 @@ void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
     /* if there is no titlebar, just don't animate for now
      XXX it would be nice tho.. */
     if (!(self->decorations & OB_FRAME_DECOR_TITLEBAR))
-      return;
+        return;
 
     /* get the current time */
     g_get_current_time(&now);
 
     /* get how long until the end */
     time = FRAME_ANIMATE_ICONIFY_TIME;
-    if (self->iconify_animation_going)
-      {
-        if (!!iconifying != (self->iconify_animation_going > 0))
-          {
+    if (self->iconify_animation_going) {
+        if (!!iconifying != (self->iconify_animation_going > 0)) {
             /* animation was already going on in the opposite direction */
             time = time - frame_animate_iconify_time_left(self, &now);
-          }
+        }
         else
-          /* animation was already going in the same direction */
-          set_end = FALSE;
-      }
+            /* animation was already going in the same direction */
+            set_end = FALSE;
+    }
     else
-      new_anim = TRUE;
+        new_anim = TRUE;
     self->iconify_animation_going = iconifying ? 1 : -1;
 
     /* set the ending time */
-    if (set_end)
-      {
+    if (set_end) {
         self->iconify_animation_end.tv_sec = now.tv_sec;
         self->iconify_animation_end.tv_usec = now.tv_usec;
         g_time_val_add(&self->iconify_animation_end, time);
-      }
+    }
 
-    if (new_anim)
-      {
+    if (new_anim) {
         ob_main_loop_timeout_remove_data(plugin.ob_main_loop,
-            frame_animate_iconify, self, FALSE);
-        ob_main_loop_timeout_add(plugin.ob_main_loop,
+                frame_animate_iconify, self, FALSE);
+        ob_main_loop_timeout_add(plugin.ob_main_loop, 
         FRAME_ANIMATE_ICONIFY_STEP_TIME, frame_animate_iconify, self,
-            g_direct_equal, NULL);
+                g_direct_equal, NULL);
 
         /* do the first step */
         frame_animate_iconify(self);
 
         /* show it during the animation even if it is not "visible" */
         if (!self->visible)
-          XMapWindow(plugin.ob_display, self->window);
-      }
-  }
+            XMapWindow(plugin.ob_display, self->window);
+    }
+}
 
 gboolean frame_iconify_animating(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     return self->iconify_animation_going != 0;
-  }
-
-ObFramePlugin plugin =
-  { 0, //gpointer handler;
-      "libdefault.la", //gchar * filename;
-      "Default", //gchar * name;
-      init, //gint (*init) (Display * display, gint screen);
-      0, // release
-      frame_new, //gpointer (*frame_new) (struct _ObClient *c);
-      frame_free, //void (*frame_free) (gpointer self);
-      frame_show, //void (*frame_show) (gpointer self);
-      frame_hide, //void (*frame_hide) (gpointer self);
-      frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
-      frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
-      frame_adjust_area, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
-      frame_adjust_client_area, //void (*frame_adjust_client_area) (gpointer self);
-      frame_adjust_state, //void (*frame_adjust_state) (gpointer self);
-      frame_adjust_focus, //void (*frame_adjust_focus) (gpointer self, gboolean hilite);
-      frame_adjust_title, //void (*frame_adjust_title) (gpointer self);
-      frame_adjust_icon, //void (*frame_adjust_icon) (gpointer self);
-      frame_grab_client, //void (*frame_grab_client) (gpointer self);
-      frame_release_client, //void (*frame_release_client) (gpointer self);
-      frame_context, //ObFrameContext (*frame_context) (struct _ObClient *self, Window win, gint x, gint y);
-      frame_client_gravity, //void (*frame_client_gravity) (gpointer self, gint *x, gint *y);
-      frame_frame_gravity, //void (*frame_frame_gravity) (gpointer self, gint *x, gint *y);
-      frame_rect_to_frame, //void (*frame_rect_to_frame) (gpointer self, Rect *r);
-      frame_rect_to_client, //void (*frame_rect_to_client) (gpointer self, Rect *r);
-      frame_flash_start, //void (*frame_flash_start) (gpointer self);
-      frame_flash_stop, //void (*frame_flash_stop) (gpointer self);
-      frame_begin_iconify_animation, //void (*frame_begin_iconify_animation) (gpointer self, gboolean iconifying);
-      frame_end_iconify_animation, //void (*frame_end_iconify_animation) (gpointer self);
-      frame_iconify_animating, // gboolean (*frame_iconify_animating)(gpointer p);
-      load_theme_config,
-
-      /* This fields are fill by openbox. */
-      0, //Display * ob_display;
-      0, //gint ob_screen;
-      0, //RrInstance *ob_rr_inst;
-      0, //gboolean config_theme_keepborder;
-      0, //struct _ObClient *focus_cycle_target;
-      0, //gchar *config_title_layout;
-      FALSE, //gboolean moveresize_in_progress;
-      0, //struct _ObMainLoop *ob_main_loop;
+}
+
+ObFramePlugin plugin = { 0, //gpointer handler;
+        "libdefault.la", //gchar * filename;
+        "Default", //gchar * name;
+        init, //gint (*init) (Display * display, gint screen);
+        0, // release
+        frame_new, //gpointer (*frame_new) (struct _ObClient *c);
+        frame_free, //void (*frame_free) (gpointer self);
+        frame_show, //void (*frame_show) (gpointer self);
+        frame_hide, //void (*frame_hide) (gpointer self);
+        frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
+        frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
+        frame_adjust_area, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
+        frame_adjust_client_area, //void (*frame_adjust_client_area) (gpointer self);
+        frame_adjust_state, //void (*frame_adjust_state) (gpointer self);
+        frame_adjust_focus, //void (*frame_adjust_focus) (gpointer self, gboolean hilite);
+        frame_adjust_title, //void (*frame_adjust_title) (gpointer self);
+        frame_adjust_icon, //void (*frame_adjust_icon) (gpointer self);
+        frame_grab_client, //void (*frame_grab_client) (gpointer self);
+        frame_release_client, //void (*frame_release_client) (gpointer self);
+        frame_context, //ObFrameContext (*frame_context) (struct _ObClient *self, Window win, gint x, gint y);
+        frame_client_gravity, //void (*frame_client_gravity) (gpointer self, gint *x, gint *y);
+        frame_frame_gravity, //void (*frame_frame_gravity) (gpointer self, gint *x, gint *y);
+        frame_rect_to_frame, //void (*frame_rect_to_frame) (gpointer self, Rect *r);
+        frame_rect_to_client, //void (*frame_rect_to_client) (gpointer self, Rect *r);
+        frame_flash_start, //void (*frame_flash_start) (gpointer self);
+        frame_flash_stop, //void (*frame_flash_stop) (gpointer self);
+        frame_begin_iconify_animation, //void (*frame_begin_iconify_animation) (gpointer self, gboolean iconifying);
+        frame_end_iconify_animation, //void (*frame_end_iconify_animation) (gpointer self);
+        frame_iconify_animating, // gboolean (*frame_iconify_animating)(gpointer p);
+        load_theme_config,
+
+        /* This fields are fill by openbox. */
+        0, //Display * ob_display;
+        0, //gint ob_screen;
+        0, //RrInstance *ob_rr_inst;
+        0, //gboolean config_theme_keepborder;
+        0, //struct _ObClient *focus_cycle_target;
+        0, //gchar *config_title_layout;
+        FALSE, //gboolean moveresize_in_progress;
+        0, //struct _ObMainLoop *ob_main_loop;
 };
 
 ObFramePlugin * get_info()
-  {
+{
     return &plugin;
-  }
+}
diff --git a/engines/concept2/frame_concept2_plugin.h b/engines/concept2/frame_concept2_plugin.h
index c4cbade..e392188 100644
--- a/engines/concept2/frame_concept2_plugin.h
+++ b/engines/concept2/frame_concept2_plugin.h
@@ -26,7 +26,7 @@
 ObFrameThemeConfig theme_config;
 
 struct _ObConceptFrame
-  {
+{
     // PUBLIC :
     struct _ObClient *client;
 
@@ -63,7 +63,6 @@ struct _ObConceptFrame
 
     guint functions;
 
-
     /* These are borders of the frame and its elements */
 
     Window top;
@@ -134,7 +133,7 @@ struct _ObConceptFrame
 
     GTimeVal iconify_animation_end;
 
-  };
+};
 
 typedef struct _ObConceptFrame ObConceptFrame;
 
@@ -147,7 +146,7 @@ void frame_hide(gpointer self);
 void frame_adjust_theme(gpointer self);
 void frame_adjust_shape(gpointer self);
 void frame_adjust_area(gpointer self, gboolean moved, gboolean resized,
-    gboolean fake);
+        gboolean fake);
 void frame_adjust_client_area(gpointer self);
 void frame_adjust_state(gpointer self);
 void frame_adjust_focus(gpointer self, gboolean hilite);
diff --git a/engines/concept2/frame_concept2_render.c b/engines/concept2/frame_concept2_render.c
index 83efbb7..ce4a573 100644
--- a/engines/concept2/frame_concept2_render.c
+++ b/engines/concept2/frame_concept2_render.c
@@ -35,28 +35,26 @@ static void framerender_shade(ObConceptFrame *self, RrAppearance *a);
 static void framerender_close(ObConceptFrame *self, RrAppearance *a);
 
 void framerender_frame(gpointer _self)
-  {
+{
     ObConceptFrame * self = (ObConceptFrame *) _self;
     if (plugin.frame_iconify_animating(self))
-      return; /* delay redrawing until the animation is done */
+        return; /* delay redrawing until the animation is done */
     if (!self->need_render)
-      return;
+        return;
     if (!self->visible)
-      return;
+        return;
     self->need_render = FALSE;
 
     gulong border_px, corner_px;
 
-    if (self->focused)
-      {
+    if (self->focused) {
         border_px = RrColorPixel(theme_config.focus_border_color);
         corner_px = RrColorPixel(theme_config.focus_corner_color);
-      }
-    else
-      {
+    }
+    else {
         border_px = RrColorPixel(theme_config.unfocus_border_color);
         corner_px = RrColorPixel(theme_config.unfocus_corner_color);
-      }
+    }
 
     XSetWindowBackground(plugin.ob_display, self->left, border_px);
     XClearWindow(plugin.ob_display, self->left);
@@ -94,4 +92,4 @@ void framerender_frame(gpointer _self)
     XClearWindow(plugin.ob_display, self->handle);
 
     XFlush(plugin.ob_display);
-  }
+}
diff --git a/engines/concept2/frame_concept2_render.h b/engines/concept2/frame_concept2_render.h
index 5235b10..deab47c 100644
--- a/engines/concept2/frame_concept2_render.h
+++ b/engines/concept2/frame_concept2_render.h
@@ -1,20 +1,20 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
-   frame_default_render.h for the Openbox window manager
-   Copyright (c) 2003-2007   Dana Jansens
+ frame_default_render.h for the Openbox window manager
+ 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
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
 
-   See the COPYING file for a copy of the GNU General Public License.
-*/
+ See the COPYING file for a copy of the GNU General Public License.
+ */
 
 #ifndef FRAME_CONCEPT2_RENDER_H_
 #define FRAME_CONCEPT2_RENDER_H_
diff --git a/engines/default/config.c b/engines/default/config.c
index 05f385a..893f8c2 100644
--- a/engines/default/config.c
+++ b/engines/default/config.c
@@ -37,20 +37,20 @@ static XrmDatabase loaddb(const gchar *name, gchar **path);
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value);
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value);
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value);
+        const gchar *rname, RrColor **value);
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans);
+        const gchar *rname, RrAppearance *value, gboolean allow_trans);
 static int parse_inline_number(const char *p);
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data);
 static void set_default_appearance(RrAppearance *a);
 
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font)
-  {
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font)
+{
     RrJustify winjust, mtitlejust;
     gchar *str;
     ObFrameThemeConfig * theme = &theme_config;
@@ -105,725 +105,682 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
     theme->osd_unhilite_fg = RrAppearanceNew(inst, 0);
 
     /* load the font stuff */
-    if (active_window_font)
-      {
+    if (active_window_font) {
         theme->win_font_focused = active_window_font;
         RrFontRef(active_window_font);
-      }
+    }
     else
-      theme->win_font_focused = RrFontOpenDefault(inst);
+        theme->win_font_focused = RrFontOpenDefault(inst);
 
-    if (inactive_window_font)
-      {
+    if (inactive_window_font) {
         theme->win_font_unfocused = inactive_window_font;
         RrFontRef(inactive_window_font);
-      }
+    }
     else
-      theme->win_font_unfocused = RrFontOpenDefault(inst);
+        theme->win_font_unfocused = RrFontOpenDefault(inst);
 
     winjust = RR_JUSTIFY_LEFT;
-    if (read_string(db, "window.label.text.justify", &str))
-      {
+    if (read_string(db, "window.label.text.justify", &str)) {
         if (!g_ascii_strcasecmp(str, "right"))
-          winjust = RR_JUSTIFY_RIGHT;
+            winjust = RR_JUSTIFY_RIGHT;
         else if (!g_ascii_strcasecmp(str, "center"))
-          winjust = RR_JUSTIFY_CENTER;
-      }
+            winjust = RR_JUSTIFY_CENTER;
+    }
 
-    if (menu_title_font)
-      {
+    if (menu_title_font) {
         theme->menu_title_font = menu_title_font;
         RrFontRef(menu_title_font);
-      }
+    }
     else
-      theme->menu_title_font = RrFontOpenDefault(inst);
+        theme->menu_title_font = RrFontOpenDefault(inst);
 
     mtitlejust = RR_JUSTIFY_LEFT;
-    if (read_string(db, "menu.title.text.justify", &str))
-      {
+    if (read_string(db, "menu.title.text.justify", &str)) {
         if (!g_ascii_strcasecmp(str, "right"))
-          mtitlejust = RR_JUSTIFY_RIGHT;
+            mtitlejust = RR_JUSTIFY_RIGHT;
         else if (!g_ascii_strcasecmp(str, "center"))
-          mtitlejust = RR_JUSTIFY_CENTER;
-      }
+            mtitlejust = RR_JUSTIFY_CENTER;
+    }
 
-    if (menu_item_font)
-      {
+    if (menu_item_font) {
         theme->menu_font = menu_item_font;
         RrFontRef(menu_item_font);
-      }
+    }
     else
-      theme->menu_font = RrFontOpenDefault(inst);
+        theme->menu_font = RrFontOpenDefault(inst);
 
-    if (osd_font)
-      {
+    if (osd_font) {
         theme->osd_font = osd_font;
         RrFontRef(osd_font);
-      }
+    }
     else
-      theme->osd_font = RrFontOpenDefault(inst);
+        theme->osd_font = RrFontOpenDefault(inst);
 
     /* load direct dimensions */
     if (!read_int(db, "menu.overlap", &theme->menu_overlap)
-        || theme->menu_overlap < -100 || theme->menu_overlap > 100)
-      theme->menu_overlap = 0;
+            || theme->menu_overlap < -100 || theme->menu_overlap > 100)
+        theme->menu_overlap = 0;
     if (!read_int(db, "window.handle.width", &theme->handle_height)
-        || theme->handle_height < 0 || theme->handle_height > 100)
-      theme->handle_height = 6;
+            || theme->handle_height < 0 || theme->handle_height > 100)
+        theme->handle_height = 6;
     if (!read_int(db, "padding.width", &theme->paddingx) || theme->paddingx < 0
-        || theme->paddingx > 100)
-      theme->paddingx = 3;
+            || theme->paddingx > 100)
+        theme->paddingx = 3;
     if (!read_int(db, "padding.height", &theme->paddingy) || theme->paddingy
-        < 0 || theme->paddingy > 100)
-      theme->paddingy = theme->paddingx;
+            < 0 || theme->paddingy > 100)
+        theme->paddingy = theme->paddingx;
     if (!read_int(db, "border.width", &theme->fbwidth) || theme->fbwidth < 0
-        || theme->fbwidth > 100)
-      theme->fbwidth = 1;
+            || theme->fbwidth > 100)
+        theme->fbwidth = 1;
     /* menu border width inherits from the frame border width */
     if (!read_int(db, "menu.border.width", &theme->mbwidth) || theme->mbwidth
-        < 0 || theme->mbwidth > 100)
-      theme->mbwidth = theme->fbwidth;
+            < 0 || theme->mbwidth > 100)
+        theme->mbwidth = theme->fbwidth;
     /* osd border width inherits from the frame border width */
     if (!read_int(db, "osd.border.width", &theme->obwidth) || theme->obwidth
-        < 0 || theme->obwidth > 100)
-      theme->obwidth = theme->fbwidth;
+            < 0 || theme->obwidth > 100)
+        theme->obwidth = theme->fbwidth;
     if (!read_int(db, "window.client.padding.width", &theme->cbwidthx)
-        || theme->cbwidthx < 0 || theme->cbwidthx > 100)
-      theme->cbwidthx = theme->paddingx;
+            || theme->cbwidthx < 0 || theme->cbwidthx > 100)
+        theme->cbwidthx = theme->paddingx;
     if (!read_int(db, "window.client.padding.height", &theme->cbwidthy)
-        || theme->cbwidthy < 0 || theme->cbwidthy > 100)
-      theme->cbwidthy = theme->cbwidthx;
+            || theme->cbwidthy < 0 || theme->cbwidthy > 100)
+        theme->cbwidthy = theme->cbwidthx;
 
     /* load colors */
     if (!read_color(db, inst, "window.active.border.color",
-        &theme->frame_focused_border_color) && !read_color(db, inst,
-        "border.color", &theme->frame_focused_border_color))
-      theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0);
+            &theme->frame_focused_border_color) && !read_color(db, inst,
+            "border.color", &theme->frame_focused_border_color))
+        theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0);
     /* title separator focused color inherits from focused boder color */
     if (!read_color(db, inst, "window.active.title.separator.color",
-        &theme->title_separator_focused_color))
-      theme->title_separator_focused_color = RrColorNew(inst,
-          theme->frame_focused_border_color->r,
-          theme->frame_focused_border_color->g,
-          theme->frame_focused_border_color->b);
+            &theme->title_separator_focused_color))
+        theme->title_separator_focused_color = RrColorNew(inst,
+                theme->frame_focused_border_color->r,
+                theme->frame_focused_border_color->g,
+                theme->frame_focused_border_color->b);
     /* unfocused border color inherits from frame focused border color */
     if (!read_color(db, inst, "window.inactive.border.color",
-        &theme->frame_unfocused_border_color))
-      theme->frame_unfocused_border_color = RrColorNew(inst,
-          theme->frame_focused_border_color->r,
-          theme->frame_focused_border_color->g,
-          theme->frame_focused_border_color->b);
+            &theme->frame_unfocused_border_color))
+        theme->frame_unfocused_border_color = RrColorNew(inst,
+                theme->frame_focused_border_color->r,
+                theme->frame_focused_border_color->g,
+                theme->frame_focused_border_color->b);
     /* title separator unfocused color inherits from unfocused boder color */
     if (!read_color(db, inst, "window.inactive.title.separator.color",
-        &theme->title_separator_unfocused_color))
-      theme->title_separator_unfocused_color = RrColorNew(inst,
-          theme->frame_unfocused_border_color->r,
-          theme->frame_unfocused_border_color->g,
-          theme->frame_unfocused_border_color->b);
+            &theme->title_separator_unfocused_color))
+        theme->title_separator_unfocused_color = RrColorNew(inst,
+                theme->frame_unfocused_border_color->r,
+                theme->frame_unfocused_border_color->g,
+                theme->frame_unfocused_border_color->b);
 
     /* menu border color inherits from frame focused border color */
     if (!read_color(db, inst, "menu.border.color", &theme->menu_border_color))
-      theme->menu_border_color = RrColorNew(inst,
-          theme->frame_focused_border_color->r,
-          theme->frame_focused_border_color->g,
-          theme->frame_focused_border_color->b);
+        theme->menu_border_color = RrColorNew(inst,
+                theme->frame_focused_border_color->r,
+                theme->frame_focused_border_color->g,
+                theme->frame_focused_border_color->b);
     /* osd border color inherits from frame focused border color */
     if (!read_color(db, inst, "osd.border.color", &theme->osd_border_color))
-      theme->osd_border_color = RrColorNew(inst,
-          theme->frame_focused_border_color->r,
-          theme->frame_focused_border_color->g,
-          theme->frame_focused_border_color->b);
+        theme->osd_border_color = RrColorNew(inst,
+                theme->frame_focused_border_color->r,
+                theme->frame_focused_border_color->g,
+                theme->frame_focused_border_color->b);
     if (!read_color(db, inst, "window.active.client.color",
-        &theme->cb_focused_color))
-      theme->cb_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+            &theme->cb_focused_color))
+        theme->cb_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     if (!read_color(db, inst, "window.inactive.client.color",
-        &theme->cb_unfocused_color))
-      theme->cb_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+            &theme->cb_unfocused_color))
+        theme->cb_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     if (!read_color(db, inst, "window.active.label.text.color",
-        &theme->title_focused_color))
-      theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0);
+            &theme->title_focused_color))
+        theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0);
     if (!read_color(db, inst, "osd.label.text.color", &theme->osd_color))
-      theme->osd_color = RrColorNew(inst, theme->title_focused_color->r,
-          theme->title_focused_color->g, theme->title_focused_color->b);
+        theme->osd_color = RrColorNew(inst, theme->title_focused_color->r,
+                theme->title_focused_color->g, theme->title_focused_color->b);
     if (!read_color(db, inst, "window.inactive.label.text.color",
-        &theme->title_unfocused_color))
-      theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+            &theme->title_unfocused_color))
+        theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     if (!read_color(db, inst, "window.active.button.unpressed.image.color",
-        &theme->titlebut_focused_unpressed_color))
-      theme->titlebut_focused_unpressed_color = RrColorNew(inst, 0, 0, 0);
+            &theme->titlebut_focused_unpressed_color))
+        theme->titlebut_focused_unpressed_color = RrColorNew(inst, 0, 0, 0);
     if (!read_color(db, inst, "window.inactive.button.unpressed.image.color",
-        &theme->titlebut_unfocused_unpressed_color))
-      theme->titlebut_unfocused_unpressed_color = RrColorNew(inst, 0xff, 0xff,
-          0xff);
+            &theme->titlebut_unfocused_unpressed_color))
+        theme->titlebut_unfocused_unpressed_color = RrColorNew(inst, 0xff,
+                0xff, 0xff);
     if (!read_color(db, inst, "window.active.button.pressed.image.color",
-        &theme->titlebut_focused_pressed_color))
-      theme->titlebut_focused_pressed_color = RrColorNew(inst,
-          theme->titlebut_focused_unpressed_color->r,
-          theme->titlebut_focused_unpressed_color->g,
-          theme->titlebut_focused_unpressed_color->b);
+            &theme->titlebut_focused_pressed_color))
+        theme->titlebut_focused_pressed_color = RrColorNew(inst,
+                theme->titlebut_focused_unpressed_color->r,
+                theme->titlebut_focused_unpressed_color->g,
+                theme->titlebut_focused_unpressed_color->b);
     if (!read_color(db, inst, "window.inactive.button.pressed.image.color",
-        &theme->titlebut_unfocused_pressed_color))
-      theme->titlebut_unfocused_pressed_color = RrColorNew(inst,
-          theme->titlebut_unfocused_unpressed_color->r,
-          theme->titlebut_unfocused_unpressed_color->g,
-          theme->titlebut_unfocused_unpressed_color->b);
+            &theme->titlebut_unfocused_pressed_color))
+        theme->titlebut_unfocused_pressed_color = RrColorNew(inst,
+                theme->titlebut_unfocused_unpressed_color->r,
+                theme->titlebut_unfocused_unpressed_color->g,
+                theme->titlebut_unfocused_unpressed_color->b);
     if (!read_color(db, inst, "window.active.button.disabled.image.color",
-        &theme->titlebut_disabled_focused_color))
-      theme->titlebut_disabled_focused_color = RrColorNew(inst, 0xff, 0xff,
-          0xff);
+            &theme->titlebut_disabled_focused_color))
+        theme->titlebut_disabled_focused_color = RrColorNew(inst, 0xff, 0xff,
+                0xff);
     if (!read_color(db, inst, "window.inactive.button.disabled.image.color",
-        &theme->titlebut_disabled_unfocused_color))
-      theme->titlebut_disabled_unfocused_color = RrColorNew(inst, 0, 0, 0);
+            &theme->titlebut_disabled_unfocused_color))
+        theme->titlebut_disabled_unfocused_color = RrColorNew(inst, 0, 0, 0);
     if (!read_color(db, inst, "window.active.button.hover.image.color",
-        &theme->titlebut_hover_focused_color))
-      theme->titlebut_hover_focused_color = RrColorNew(inst,
-          theme->titlebut_focused_unpressed_color->r,
-          theme->titlebut_focused_unpressed_color->g,
-          theme->titlebut_focused_unpressed_color->b);
+            &theme->titlebut_hover_focused_color))
+        theme->titlebut_hover_focused_color = RrColorNew(inst,
+                theme->titlebut_focused_unpressed_color->r,
+                theme->titlebut_focused_unpressed_color->g,
+                theme->titlebut_focused_unpressed_color->b);
     if (!read_color(db, inst, "window.inactive.button.hover.image.color",
-        &theme->titlebut_hover_unfocused_color))
-      theme->titlebut_hover_unfocused_color = RrColorNew(inst,
-          theme->titlebut_unfocused_unpressed_color->r,
-          theme->titlebut_unfocused_unpressed_color->g,
-          theme->titlebut_unfocused_unpressed_color->b);
+            &theme->titlebut_hover_unfocused_color))
+        theme->titlebut_hover_unfocused_color = RrColorNew(inst,
+                theme->titlebut_unfocused_unpressed_color->r,
+                theme->titlebut_unfocused_unpressed_color->g,
+                theme->titlebut_unfocused_unpressed_color->b);
     if (!read_color(db, inst,
-        "window.active.button.toggled.unpressed.image.color",
-        &theme->titlebut_toggled_focused_unpressed_color) && !read_color(db,
-        inst, "window.active.button.toggled.image.color",
-        &theme->titlebut_toggled_focused_unpressed_color))
-      theme->titlebut_toggled_focused_unpressed_color = RrColorNew(inst,
-          theme->titlebut_focused_pressed_color->r,
-          theme->titlebut_focused_pressed_color->g,
-          theme->titlebut_focused_pressed_color->b);
+            "window.active.button.toggled.unpressed.image.color",
+            &theme->titlebut_toggled_focused_unpressed_color) && !read_color(
+            db, inst, "window.active.button.toggled.image.color",
+            &theme->titlebut_toggled_focused_unpressed_color))
+        theme->titlebut_toggled_focused_unpressed_color = RrColorNew(inst,
+                theme->titlebut_focused_pressed_color->r,
+                theme->titlebut_focused_pressed_color->g,
+                theme->titlebut_focused_pressed_color->b);
     if (!read_color(db, inst,
-        "window.inactive.button.toggled.unpressed.image.color",
-        &theme->titlebut_toggled_unfocused_unpressed_color) && !read_color(db,
-        inst, "window.inactive.button.toggled.image.color",
-        &theme->titlebut_toggled_unfocused_unpressed_color))
-      theme->titlebut_toggled_unfocused_unpressed_color = RrColorNew(inst,
-          theme->titlebut_unfocused_pressed_color->r,
-          theme->titlebut_unfocused_pressed_color->g,
-          theme->titlebut_unfocused_pressed_color->b);
+            "window.inactive.button.toggled.unpressed.image.color",
+            &theme->titlebut_toggled_unfocused_unpressed_color) && !read_color(
+            db, inst, "window.inactive.button.toggled.image.color",
+            &theme->titlebut_toggled_unfocused_unpressed_color))
+        theme->titlebut_toggled_unfocused_unpressed_color = RrColorNew(inst,
+                theme->titlebut_unfocused_pressed_color->r,
+                theme->titlebut_unfocused_pressed_color->g,
+                theme->titlebut_unfocused_pressed_color->b);
     if (!read_color(db, inst, "window.active.button.toggled.hover.image.color",
-        &theme->titlebut_toggled_hover_focused_color))
-      theme->titlebut_toggled_hover_focused_color = RrColorNew(inst,
-          theme->titlebut_toggled_focused_unpressed_color->r,
-          theme->titlebut_toggled_focused_unpressed_color->g,
-          theme->titlebut_toggled_focused_unpressed_color->b);
+            &theme->titlebut_toggled_hover_focused_color))
+        theme->titlebut_toggled_hover_focused_color = RrColorNew(inst,
+                theme->titlebut_toggled_focused_unpressed_color->r,
+                theme->titlebut_toggled_focused_unpressed_color->g,
+                theme->titlebut_toggled_focused_unpressed_color->b);
     if (!read_color(db, inst,
-        "window.inactive.button.toggled.hover.image.color",
-        &theme->titlebut_toggled_hover_unfocused_color))
-      theme->titlebut_toggled_hover_unfocused_color = RrColorNew(inst,
-          theme->titlebut_toggled_unfocused_unpressed_color->r,
-          theme->titlebut_toggled_unfocused_unpressed_color->g,
-          theme->titlebut_toggled_unfocused_unpressed_color->b);
+            "window.inactive.button.toggled.hover.image.color",
+            &theme->titlebut_toggled_hover_unfocused_color))
+        theme->titlebut_toggled_hover_unfocused_color = RrColorNew(inst,
+                theme->titlebut_toggled_unfocused_unpressed_color->r,
+                theme->titlebut_toggled_unfocused_unpressed_color->g,
+                theme->titlebut_toggled_unfocused_unpressed_color->b);
     if (!read_color(db, inst,
-        "window.active.button.toggled.pressed.image.color",
-        &theme->titlebut_toggled_focused_pressed_color))
-      theme->titlebut_toggled_focused_pressed_color = RrColorNew(inst,
-          theme->titlebut_focused_pressed_color->r,
-          theme->titlebut_focused_pressed_color->g,
-          theme->titlebut_focused_pressed_color->b);
+            "window.active.button.toggled.pressed.image.color",
+            &theme->titlebut_toggled_focused_pressed_color))
+        theme->titlebut_toggled_focused_pressed_color = RrColorNew(inst,
+                theme->titlebut_focused_pressed_color->r,
+                theme->titlebut_focused_pressed_color->g,
+                theme->titlebut_focused_pressed_color->b);
     if (!read_color(db, inst,
-        "window.inactive.button.toggled.pressed.image.color",
-        &theme->titlebut_toggled_unfocused_pressed_color))
-      theme->titlebut_toggled_unfocused_pressed_color = RrColorNew(inst,
-          theme->titlebut_unfocused_pressed_color->r,
-          theme->titlebut_unfocused_pressed_color->g,
-          theme->titlebut_unfocused_pressed_color->b);
+            "window.inactive.button.toggled.pressed.image.color",
+            &theme->titlebut_toggled_unfocused_pressed_color))
+        theme->titlebut_toggled_unfocused_pressed_color = RrColorNew(inst,
+                theme->titlebut_unfocused_pressed_color->r,
+                theme->titlebut_unfocused_pressed_color->g,
+                theme->titlebut_unfocused_pressed_color->b);
     if (!read_color(db, inst, "menu.title.text.color", &theme->menu_title_color))
-      theme->menu_title_color = RrColorNew(inst, 0, 0, 0);
+        theme->menu_title_color = RrColorNew(inst, 0, 0, 0);
     if (!read_color(db, inst, "menu.items.text.color", &theme->menu_color))
-      theme->menu_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+        theme->menu_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     if (!read_color(db, inst, "menu.items.disabled.text.color",
-        &theme->menu_disabled_color))
-      theme->menu_disabled_color = RrColorNew(inst, 0, 0, 0);
+            &theme->menu_disabled_color))
+        theme->menu_disabled_color = RrColorNew(inst, 0, 0, 0);
     if (!read_color(db, inst, "menu.items.active.disabled.text.color",
-        &theme->menu_disabled_selected_color))
-      theme->menu_disabled_selected_color = RrColorNew(inst,
-          theme->menu_disabled_color->r, theme->menu_disabled_color->g,
-          theme->menu_disabled_color->b);
+            &theme->menu_disabled_selected_color))
+        theme->menu_disabled_selected_color = RrColorNew(inst,
+                theme->menu_disabled_color->r, theme->menu_disabled_color->g,
+                theme->menu_disabled_color->b);
     if (!read_color(db, inst, "menu.items.active.text.color",
-        &theme->menu_selected_color))
-      theme->menu_selected_color = RrColorNew(inst, 0, 0, 0);
+            &theme->menu_selected_color))
+        theme->menu_selected_color = RrColorNew(inst, 0, 0, 0);
 
     /* load the image masks */
 
     /* maximize button masks */
     userdef = TRUE;
-    if (!read_mask(inst, path, theme, "max.xbm", &theme->max_mask))
-      {
-        guchar data[] =
-          { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
+    if (!read_mask(inst, path, theme, "max.xbm", &theme->max_mask)) {
+        guchar data[] = { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
         theme->max_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
         userdef = FALSE;
-      }
+    }
     if (!read_mask(inst, path, theme, "max_toggled.xbm",
-        &theme->max_toggled_mask))
-      {
+            &theme->max_toggled_mask)) {
         if (userdef)
-          theme->max_toggled_mask = RrPixmapMaskCopy(theme->max_mask);
-        else
-          {
-            guchar data[] =
-              { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
+            theme->max_toggled_mask = RrPixmapMaskCopy(theme->max_mask);
+        else {
+            guchar data[] = { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
             theme->max_toggled_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-          }
-      }
+        }
+    }
     if (!read_mask(inst, path, theme, "max_pressed.xbm",
-        &theme->max_pressed_mask))
-      theme->max_pressed_mask = RrPixmapMaskCopy(theme->max_mask);
+            &theme->max_pressed_mask))
+        theme->max_pressed_mask = RrPixmapMaskCopy(theme->max_mask);
     if (!read_mask(inst, path, theme, "max_disabled.xbm",
-        &theme->max_disabled_mask))
-      theme->max_disabled_mask = RrPixmapMaskCopy(theme->max_mask);
+            &theme->max_disabled_mask))
+        theme->max_disabled_mask = RrPixmapMaskCopy(theme->max_mask);
     if (!read_mask(inst, path, theme, "max_hover.xbm", &theme->max_hover_mask))
-      theme->max_hover_mask = RrPixmapMaskCopy(theme->max_mask);
+        theme->max_hover_mask = RrPixmapMaskCopy(theme->max_mask);
     if (!read_mask(inst, path, theme, "max_toggled_pressed.xbm",
-        &theme->max_toggled_pressed_mask))
-      theme->max_toggled_pressed_mask
-          = RrPixmapMaskCopy(theme->max_toggled_mask);
+            &theme->max_toggled_pressed_mask))
+        theme->max_toggled_pressed_mask
+                = RrPixmapMaskCopy(theme->max_toggled_mask);
     if (!read_mask(inst, path, theme, "max_toggled_hover.xbm",
-        &theme->max_toggled_hover_mask))
-      theme->max_toggled_hover_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
+            &theme->max_toggled_hover_mask))
+        theme->max_toggled_hover_mask
+                = RrPixmapMaskCopy(theme->max_toggled_mask);
 
     /* iconify button masks */
-    if (!read_mask(inst, path, theme, "iconify.xbm", &theme->iconify_mask))
-      {
-        guchar data[] =
-          { 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f };
+    if (!read_mask(inst, path, theme, "iconify.xbm", &theme->iconify_mask)) {
+        guchar data[] = { 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f };
         theme->iconify_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-      }
+    }
     if (!read_mask(inst, path, theme, "iconify_pressed.xbm",
-        &theme->iconify_pressed_mask))
-      theme->iconify_pressed_mask = RrPixmapMaskCopy(theme->iconify_mask);
+            &theme->iconify_pressed_mask))
+        theme->iconify_pressed_mask = RrPixmapMaskCopy(theme->iconify_mask);
     if (!read_mask(inst, path, theme, "iconify_disabled.xbm",
-        &theme->iconify_disabled_mask))
-      theme->iconify_disabled_mask = RrPixmapMaskCopy(theme->iconify_mask);
+            &theme->iconify_disabled_mask))
+        theme->iconify_disabled_mask = RrPixmapMaskCopy(theme->iconify_mask);
     if (!read_mask(inst, path, theme, "iconify_hover.xbm",
-        &theme->iconify_hover_mask))
-      theme->iconify_hover_mask = RrPixmapMaskCopy(theme->iconify_mask);
+            &theme->iconify_hover_mask))
+        theme->iconify_hover_mask = RrPixmapMaskCopy(theme->iconify_mask);
 
     /* all desktops button masks */
     userdef = TRUE;
-    if (!read_mask(inst, path, theme, "desk.xbm", &theme->desk_mask))
-      {
-        guchar data[] =
-          { 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 };
+    if (!read_mask(inst, path, theme, "desk.xbm", &theme->desk_mask)) {
+        guchar data[] = { 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 };
         theme->desk_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
         userdef = FALSE;
-      }
+    }
     if (!read_mask(inst, path, theme, "desk_toggled.xbm",
-        &theme->desk_toggled_mask))
-      {
+            &theme->desk_toggled_mask)) {
         if (userdef)
-          theme->desk_toggled_mask = RrPixmapMaskCopy(theme->desk_mask);
-        else
-          {
-            guchar data[] =
-              { 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
+            theme->desk_toggled_mask = RrPixmapMaskCopy(theme->desk_mask);
+        else {
+            guchar data[] = { 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
             theme->desk_toggled_mask
-                = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-          }
-      }
+                    = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
+        }
+    }
     if (!read_mask(inst, path, theme, "desk_pressed.xbm",
-        &theme->desk_pressed_mask))
-      theme->desk_pressed_mask = RrPixmapMaskCopy(theme->desk_mask);
+            &theme->desk_pressed_mask))
+        theme->desk_pressed_mask = RrPixmapMaskCopy(theme->desk_mask);
     if (!read_mask(inst, path, theme, "desk_disabled.xbm",
-        &theme->desk_disabled_mask))
-      theme->desk_disabled_mask = RrPixmapMaskCopy(theme->desk_mask);
+            &theme->desk_disabled_mask))
+        theme->desk_disabled_mask = RrPixmapMaskCopy(theme->desk_mask);
     if (!read_mask(inst, path, theme, "desk_hover.xbm", &theme->desk_hover_mask))
-      theme->desk_hover_mask = RrPixmapMaskCopy(theme->desk_mask);
+        theme->desk_hover_mask = RrPixmapMaskCopy(theme->desk_mask);
     if (!read_mask(inst, path, theme, "desk_toggled_pressed.xbm",
-        &theme->desk_toggled_pressed_mask))
-      theme->desk_toggled_pressed_mask
-          = RrPixmapMaskCopy(theme->desk_toggled_mask);
+            &theme->desk_toggled_pressed_mask))
+        theme->desk_toggled_pressed_mask
+                = RrPixmapMaskCopy(theme->desk_toggled_mask);
     if (!read_mask(inst, path, theme, "desk_toggled_hover.xbm",
-        &theme->desk_toggled_hover_mask))
-      theme->desk_toggled_hover_mask
-          = RrPixmapMaskCopy(theme->desk_toggled_mask);
+            &theme->desk_toggled_hover_mask))
+        theme->desk_toggled_hover_mask
+                = RrPixmapMaskCopy(theme->desk_toggled_mask);
 
     /* shade button masks */
-    if (!read_mask(inst, path, theme, "shade.xbm", &theme->shade_mask))
-      {
-        guchar data[] =
-          { 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00 };
+    if (!read_mask(inst, path, theme, "shade.xbm", &theme->shade_mask)) {
+        guchar data[] = { 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00 };
         theme->shade_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-      }
+    }
     if (!read_mask(inst, path, theme, "shade_toggled.xbm",
-        &theme->shade_toggled_mask))
-      theme->shade_toggled_mask = RrPixmapMaskCopy(theme->shade_mask);
+            &theme->shade_toggled_mask))
+        theme->shade_toggled_mask = RrPixmapMaskCopy(theme->shade_mask);
     if (!read_mask(inst, path, theme, "shade_pressed.xbm",
-        &theme->shade_pressed_mask))
-      theme->shade_pressed_mask = RrPixmapMaskCopy(theme->shade_mask);
+            &theme->shade_pressed_mask))
+        theme->shade_pressed_mask = RrPixmapMaskCopy(theme->shade_mask);
     if (!read_mask(inst, path, theme, "shade_disabled.xbm",
-        &theme->shade_disabled_mask))
-      theme->shade_disabled_mask = RrPixmapMaskCopy(theme->shade_mask);
+            &theme->shade_disabled_mask))
+        theme->shade_disabled_mask = RrPixmapMaskCopy(theme->shade_mask);
     if (!read_mask(inst, path, theme, "shade_hover.xbm",
-        &theme->shade_hover_mask))
-      theme->shade_hover_mask = RrPixmapMaskCopy(theme->shade_mask);
+            &theme->shade_hover_mask))
+        theme->shade_hover_mask = RrPixmapMaskCopy(theme->shade_mask);
     if (!read_mask(inst, path, theme, "shade_toggled_pressed.xbm",
-        &theme->shade_toggled_pressed_mask))
-      theme->shade_toggled_pressed_mask
-          = RrPixmapMaskCopy(theme->shade_toggled_mask);
+            &theme->shade_toggled_pressed_mask))
+        theme->shade_toggled_pressed_mask
+                = RrPixmapMaskCopy(theme->shade_toggled_mask);
     if (!read_mask(inst, path, theme, "shade_toggled_hover.xbm",
-        &theme->shade_toggled_hover_mask))
-      theme->shade_toggled_hover_mask
-          = RrPixmapMaskCopy(theme->shade_toggled_mask);
+            &theme->shade_toggled_hover_mask))
+        theme->shade_toggled_hover_mask
+                = RrPixmapMaskCopy(theme->shade_toggled_mask);
 
     /* close button masks */
-    if (!read_mask(inst, path, theme, "close.xbm", &theme->close_mask))
-      {
-        guchar data[] =
-          { 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 };
+    if (!read_mask(inst, path, theme, "close.xbm", &theme->close_mask)) {
+        guchar data[] = { 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 };
         theme->close_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-      }
+    }
     if (!read_mask(inst, path, theme, "close_pressed.xbm",
-        &theme->close_pressed_mask))
-      theme->close_pressed_mask = RrPixmapMaskCopy(theme->close_mask);
+            &theme->close_pressed_mask))
+        theme->close_pressed_mask = RrPixmapMaskCopy(theme->close_mask);
     if (!read_mask(inst, path, theme, "close_disabled.xbm",
-        &theme->close_disabled_mask))
-      theme->close_disabled_mask = RrPixmapMaskCopy(theme->close_mask);
+            &theme->close_disabled_mask))
+        theme->close_disabled_mask = RrPixmapMaskCopy(theme->close_mask);
     if (!read_mask(inst, path, theme, "close_hover.xbm",
-        &theme->close_hover_mask))
-      theme->close_hover_mask = RrPixmapMaskCopy(theme->close_mask);
+            &theme->close_hover_mask))
+        theme->close_hover_mask = RrPixmapMaskCopy(theme->close_mask);
 
     /* submenu bullet mask */
-    if (!read_mask(inst, path, theme, "bullet.xbm", &theme->menu_bullet_mask))
-      {
-        guchar data[] =
-          { 0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 };
+    if (!read_mask(inst, path, theme, "bullet.xbm", &theme->menu_bullet_mask)) {
+        guchar data[] = { 0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 };
         theme->menu_bullet_mask = RrPixmapMaskNew(inst, 4, 7, (gchar*)data);
-      }
+    }
 
     /* setup the default window icon */
     theme->def_win_icon = read_c_image(OB_DEFAULT_ICON_WIDTH,
-        OB_DEFAULT_ICON_HEIGHT, OB_DEFAULT_ICON_pixel_data);
+            OB_DEFAULT_ICON_HEIGHT, OB_DEFAULT_ICON_pixel_data);
 
     /* the toggled hover mask = the toggled unpressed mask (i.e. no change) */
     theme->max_toggled_hover_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
     theme->desk_toggled_hover_mask = RrPixmapMaskCopy(theme->desk_toggled_mask);
     theme->shade_toggled_hover_mask
-        = RrPixmapMaskCopy(theme->shade_toggled_mask);
+            = RrPixmapMaskCopy(theme->shade_toggled_mask);
     /* the toggled pressed mask = the toggled unpressed mask (i.e. no change)*/
     theme->max_toggled_pressed_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
     theme->desk_toggled_pressed_mask
-        = RrPixmapMaskCopy(theme->desk_toggled_mask);
+            = RrPixmapMaskCopy(theme->desk_toggled_mask);
     theme->shade_toggled_pressed_mask
-        = RrPixmapMaskCopy(theme->shade_toggled_mask);
+            = RrPixmapMaskCopy(theme->shade_toggled_mask);
 
     /* read the decoration textures */
     if (!read_appearance(db, inst, "window.active.title.bg",
-        theme->a_focused_title, FALSE))
-      set_default_appearance(theme->a_focused_title);
+            theme->a_focused_title, FALSE))
+        set_default_appearance(theme->a_focused_title);
     if (!read_appearance(db, inst, "window.inactive.title.bg",
-        theme->a_unfocused_title, FALSE))
-      set_default_appearance(theme->a_unfocused_title);
+            theme->a_unfocused_title, FALSE))
+        set_default_appearance(theme->a_unfocused_title);
     if (!read_appearance(db, inst, "window.active.label.bg",
-        theme->a_focused_label, TRUE))
-      set_default_appearance(theme->a_focused_label);
+            theme->a_focused_label, TRUE))
+        set_default_appearance(theme->a_focused_label);
     if (!read_appearance(db, inst, "window.inactive.label.bg",
-        theme->a_unfocused_label, TRUE))
-      set_default_appearance(theme->a_unfocused_label);
+            theme->a_unfocused_label, TRUE))
+        set_default_appearance(theme->a_unfocused_label);
     if (!read_appearance(db, inst, "window.active.handle.bg",
-        theme->a_focused_handle, FALSE))
-      set_default_appearance(theme->a_focused_handle);
+            theme->a_focused_handle, FALSE))
+        set_default_appearance(theme->a_focused_handle);
     if (!read_appearance(db, inst, "window.inactive.handle.bg",
-        theme->a_unfocused_handle, FALSE))
-      set_default_appearance(theme->a_unfocused_handle);
+            theme->a_unfocused_handle, FALSE))
+        set_default_appearance(theme->a_unfocused_handle);
     if (!read_appearance(db, inst, "window.active.grip.bg",
-        theme->a_focused_grip, TRUE))
-      set_default_appearance(theme->a_focused_grip);
+            theme->a_focused_grip, TRUE))
+        set_default_appearance(theme->a_focused_grip);
     if (!read_appearance(db, inst, "window.inactive.grip.bg",
-        theme->a_unfocused_grip, TRUE))
-      set_default_appearance(theme->a_unfocused_grip);
+            theme->a_unfocused_grip, TRUE))
+        set_default_appearance(theme->a_unfocused_grip);
     if (!read_appearance(db, inst, "menu.items.bg", theme->a_menu, FALSE))
-      set_default_appearance(theme->a_menu);
+        set_default_appearance(theme->a_menu);
     if (!read_appearance(db, inst, "menu.title.bg", theme->a_menu_title, TRUE))
-      set_default_appearance(theme->a_menu_title);
+        set_default_appearance(theme->a_menu_title);
     if (!read_appearance(db, inst, "menu.items.active.bg",
-        theme->a_menu_selected, TRUE))
-      set_default_appearance(theme->a_menu_selected);
+            theme->a_menu_selected, TRUE))
+        set_default_appearance(theme->a_menu_selected);
     theme->a_menu_disabled_selected = RrAppearanceCopy(theme->a_menu_selected);
 
     /* read appearances for non-decorations (on-screen-display) */
-    if (!read_appearance(db, inst, "osd.bg", theme->osd_hilite_bg, FALSE))
-      {
+    if (!read_appearance(db, inst, "osd.bg", theme->osd_hilite_bg, FALSE)) {
         RrAppearanceFree(theme->osd_hilite_bg);
         theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_title);
-      }
+    }
     if (!read_appearance(db, inst, "osd.label.bg", theme->osd_hilite_label,
-        TRUE))
-      {
+            TRUE)) {
         RrAppearanceFree(theme->osd_hilite_label);
         theme->osd_hilite_label = RrAppearanceCopy(theme->a_focused_label);
-      }
+    }
     /* osd_hilite_fg can't be parentrel */
     if (!read_appearance(db, inst, "osd.hilight.bg", theme->osd_hilite_fg,
-        FALSE))
-      {
+            FALSE)) {
         RrAppearanceFree(theme->osd_hilite_fg);
         if (theme->a_focused_label->surface.grad != RR_SURFACE_PARENTREL)
-          theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
+            theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
         else
-          theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
-      }
+            theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
+    }
     /* osd_unhilite_fg can't be parentrel either */
     if (!read_appearance(db, inst, "osd.unhilight.bg", theme->osd_unhilite_fg,
-        FALSE))
-      {
+            FALSE)) {
         RrAppearanceFree(theme->osd_unhilite_fg);
         if (theme->a_unfocused_label->surface.grad != RR_SURFACE_PARENTREL)
-          theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_label);
+            theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_label);
         else
-          theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_title);
-      }
+            theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_title);
+    }
 
     /* read buttons textures */
     if (!read_appearance(db, inst, "window.active.button.disabled.bg",
-        theme->a_disabled_focused_max, TRUE))
-      set_default_appearance(theme->a_disabled_focused_max);
+            theme->a_disabled_focused_max, TRUE))
+        set_default_appearance(theme->a_disabled_focused_max);
     if (!read_appearance(db, inst, "window.inactive.button.disabled.bg",
-        theme->a_disabled_unfocused_max, TRUE))
-      set_default_appearance(theme->a_disabled_unfocused_max);
+            theme->a_disabled_unfocused_max, TRUE))
+        set_default_appearance(theme->a_disabled_unfocused_max);
     if (!read_appearance(db, inst, "window.active.button.pressed.bg",
-        theme->a_focused_pressed_max, TRUE))
-      set_default_appearance(theme->a_focused_pressed_max);
+            theme->a_focused_pressed_max, TRUE))
+        set_default_appearance(theme->a_focused_pressed_max);
     if (!read_appearance(db, inst, "window.inactive.button.pressed.bg",
-        theme->a_unfocused_pressed_max, TRUE))
-      set_default_appearance(theme->a_unfocused_pressed_max);
+            theme->a_unfocused_pressed_max, TRUE))
+        set_default_appearance(theme->a_unfocused_pressed_max);
     if (!read_appearance(db, inst, "window.active.button.toggled.unpressed.bg",
-        theme->a_toggled_focused_unpressed_max, TRUE) && !read_appearance(db,
-        inst, "window.active.button.toggled.bg",
-        theme->a_toggled_focused_unpressed_max, TRUE))
-      {
+            theme->a_toggled_focused_unpressed_max, TRUE) && !read_appearance(
+            db, inst, "window.active.button.toggled.bg",
+            theme->a_toggled_focused_unpressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_focused_unpressed_max);
         theme->a_toggled_focused_unpressed_max
-            = RrAppearanceCopy(theme->a_focused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_focused_pressed_max);
+    }
     if (!read_appearance(db, inst,
-        "window.inactive.button.toggled.unpressed.bg",
-        theme->a_toggled_unfocused_unpressed_max, TRUE) && !read_appearance(db,
-        inst, "window.inactive.button.toggled.bg",
-        theme->a_toggled_unfocused_unpressed_max, TRUE))
-      {
+            "window.inactive.button.toggled.unpressed.bg",
+            theme->a_toggled_unfocused_unpressed_max, TRUE)
+            && !read_appearance(db, inst, "window.inactive.button.toggled.bg",
+                    theme->a_toggled_unfocused_unpressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_unfocused_unpressed_max);
         theme->a_toggled_unfocused_unpressed_max
-            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+    }
     if (!read_appearance(db, inst, "window.active.button.toggled.hover.bg",
-        theme->a_toggled_hover_focused_max, TRUE))
-      {
+            theme->a_toggled_hover_focused_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_hover_focused_max);
         theme->a_toggled_hover_focused_max
-            = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
+    }
     if (!read_appearance(db, inst, "window.inactive.button.toggled.hover.bg",
-        theme->a_toggled_hover_unfocused_max, TRUE))
-      {
+            theme->a_toggled_hover_unfocused_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_hover_unfocused_max);
         theme->a_toggled_hover_unfocused_max
-            = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
+    }
     if (!read_appearance(db, inst, "window.active.button.toggled.pressed.bg",
-        theme->a_toggled_focused_pressed_max, TRUE))
-      {
+            theme->a_toggled_focused_pressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_focused_pressed_max);
         theme->a_toggled_focused_pressed_max
-            = RrAppearanceCopy(theme->a_focused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_focused_pressed_max);
+    }
     if (!read_appearance(db, inst, "window.inactive.button.toggled.pressed.bg",
-        theme->a_toggled_unfocused_pressed_max, TRUE))
-      {
+            theme->a_toggled_unfocused_pressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_unfocused_pressed_max);
         theme->a_toggled_unfocused_pressed_max
-            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+    }
     if (!read_appearance(db, inst, "window.active.button.unpressed.bg",
-        theme->a_focused_unpressed_max, TRUE))
-      set_default_appearance(theme->a_focused_unpressed_max);
+            theme->a_focused_unpressed_max, TRUE))
+        set_default_appearance(theme->a_focused_unpressed_max);
     if (!read_appearance(db, inst, "window.inactive.button.unpressed.bg",
-        theme->a_unfocused_unpressed_max, TRUE))
-      set_default_appearance(theme->a_unfocused_unpressed_max);
+            theme->a_unfocused_unpressed_max, TRUE))
+        set_default_appearance(theme->a_unfocused_unpressed_max);
     if (!read_appearance(db, inst, "window.active.button.hover.bg",
-        theme->a_hover_focused_max, TRUE))
-      {
+            theme->a_hover_focused_max, TRUE)) {
         RrAppearanceFree(theme->a_hover_focused_max);
         theme->a_hover_focused_max
-            = RrAppearanceCopy(theme->a_focused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_focused_unpressed_max);
+    }
     if (!read_appearance(db, inst, "window.inactive.button.hover.bg",
-        theme->a_hover_unfocused_max, TRUE))
-      {
+            theme->a_hover_unfocused_max, TRUE)) {
         RrAppearanceFree(theme->a_hover_unfocused_max);
         theme->a_hover_unfocused_max
-            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+    }
 
     theme->a_disabled_focused_close
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_close
-        = RrAppearanceCopy(theme->a_disabled_unfocused_max);
+            = RrAppearanceCopy(theme->a_disabled_unfocused_max);
     theme->a_hover_focused_close = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_close
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_unfocused_unpressed_close
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_close
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_close
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_close
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
     theme->a_disabled_focused_desk
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_desk
-        = RrAppearanceCopy(theme->a_disabled_unfocused_max);
+            = RrAppearanceCopy(theme->a_disabled_unfocused_max);
     theme->a_hover_focused_desk = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_desk
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_toggled_hover_focused_desk
-        = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
     theme->a_toggled_hover_unfocused_desk
-        = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
     theme->a_toggled_focused_unpressed_desk
-        = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
     theme->a_toggled_unfocused_unpressed_desk
-        = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
     theme->a_toggled_focused_pressed_desk
-        = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
     theme->a_toggled_unfocused_pressed_desk
-        = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
     theme->a_unfocused_unpressed_desk
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_desk
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_desk
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_desk
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
     theme->a_disabled_focused_shade
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_shade
-        = RrAppearanceCopy(theme->a_disabled_unfocused_max);
+            = RrAppearanceCopy(theme->a_disabled_unfocused_max);
     theme->a_hover_focused_shade = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_shade
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_toggled_hover_focused_shade
-        = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
     theme->a_toggled_hover_unfocused_shade
-        = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
     theme->a_toggled_focused_unpressed_shade
-        = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
     theme->a_toggled_unfocused_unpressed_shade
-        = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
     theme->a_toggled_focused_pressed_shade
-        = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
     theme->a_toggled_unfocused_pressed_shade
-        = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
     theme->a_unfocused_unpressed_shade
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_shade
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_shade
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_shade
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
     theme->a_disabled_focused_iconify
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_iconify
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_hover_focused_iconify
-        = RrAppearanceCopy(theme->a_hover_focused_max);
+            = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_iconify
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_unfocused_unpressed_iconify
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_iconify
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_iconify
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_iconify
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
 
     theme->a_icon->surface.grad
-        = theme->a_clear->surface.grad
-            = theme->a_clear_tex->surface.grad
-                = theme->a_menu_text_title->surface.grad
-                    = theme->a_menu_normal->surface.grad
-                        = theme->a_menu_disabled->surface.grad
-                            = theme->a_menu_text_normal->surface.grad
-                                = theme->a_menu_text_selected->surface.grad
-                                    = theme->a_menu_text_disabled->surface.grad
-                                        = theme->a_menu_text_disabled_selected->surface.grad
-                                            = theme->a_menu_bullet_normal->surface.grad
-                                                = theme->a_menu_bullet_selected->surface.grad
-                                                    = RR_SURFACE_PARENTREL;
+            = theme->a_clear->surface.grad
+                    = theme->a_clear_tex->surface.grad
+                            = theme->a_menu_text_title->surface.grad
+                                    = theme->a_menu_normal->surface.grad
+                                            = theme->a_menu_disabled->surface.grad
+                                                    = theme->a_menu_text_normal->surface.grad
+                                                            = theme->a_menu_text_selected->surface.grad
+                                                                    = theme->a_menu_text_disabled->surface.grad
+                                                                            = theme->a_menu_text_disabled_selected->surface.grad
+                                                                                    = theme->a_menu_bullet_normal->surface.grad
+                                                                                            = theme->a_menu_bullet_selected->surface.grad
+                                                                                                    = RR_SURFACE_PARENTREL;
 
     /* set up the textures */
     theme->a_focused_label->texture[0].type = RR_TEXTURE_TEXT;
     theme->a_focused_label->texture[0].data.text.justify = winjust;
     theme->a_focused_label->texture[0].data.text.font=theme->win_font_focused;
     theme->a_focused_label->texture[0].data.text.color
-        = theme->title_focused_color;
+            = theme->title_focused_color;
 
-    if (read_string(db, "window.active.label.text.font", &str))
-      {
+    if (read_string(db, "window.active.label.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_focused_label->texture[0].data.text.shadow_offset_x = i;
             theme->a_focused_label->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
 
             theme->title_focused_shadow_color = RrColorNew(inst, j, j, j);
             theme->title_focused_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->title_focused_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->title_focused_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_focused_label->texture[0].data.text.shadow_color
-        = theme->title_focused_shadow_color;
+            = theme->title_focused_shadow_color;
     theme->a_focused_label->texture[0].data.text.shadow_alpha
-        = theme->title_focused_shadow_alpha;
+            = theme->title_focused_shadow_alpha;
 
     theme->osd_hilite_label->texture[0].type = RR_TEXTURE_TEXT;
     theme->osd_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
     theme->osd_hilite_label->texture[0].data.text.font = theme->osd_font;
     theme->osd_hilite_label->texture[0].data.text.color = theme->osd_color;
 
-    if (read_string(db, "osd.label.text.font", &str))
-      {
+    if (read_string(db, "osd.label.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_focused_label->texture[0].data.text.shadow_offset_x = i;
             theme->a_focused_label->texture[0].data.text.shadow_offset_y = i;
             theme->osd_hilite_label->texture[0].data.text.shadow_offset_x = i;
             theme->osd_hilite_label->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
@@ -832,155 +789,143 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
             theme->title_focused_shadow_alpha = i;
             theme->osd_shadow_color = RrColorNew(inst, j, j, j);
             theme->osd_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->title_focused_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->title_focused_shadow_alpha = 50;
             theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->osd_shadow_alpha = 50;
-          }
-      }
-    else
-      {
+        }
+    }
+    else {
         /* inherit the font settings from the focused label */
         theme->osd_hilite_label->texture[0].data.text.shadow_offset_x
-            = theme->a_focused_label->texture[0].data.text.shadow_offset_x;
+                = theme->a_focused_label->texture[0].data.text.shadow_offset_x;
         theme->osd_hilite_label->texture[0].data.text.shadow_offset_y
-            = theme->a_focused_label->texture[0].data.text.shadow_offset_y;
+                = theme->a_focused_label->texture[0].data.text.shadow_offset_y;
         if (theme->title_focused_shadow_color)
-          theme->osd_shadow_color = RrColorNew(inst,
-              theme->title_focused_shadow_color->r,
-              theme->title_focused_shadow_color->g,
-              theme->title_focused_shadow_color->b);
+            theme->osd_shadow_color = RrColorNew(inst,
+                    theme->title_focused_shadow_color->r,
+                    theme->title_focused_shadow_color->g,
+                    theme->title_focused_shadow_color->b);
         else
-          theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
+            theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
         theme->osd_shadow_alpha = theme->title_focused_shadow_alpha;
-      }
+    }
 
     theme->osd_hilite_label->texture[0].data.text.shadow_color
-        = theme->osd_shadow_color;
+            = theme->osd_shadow_color;
     theme->osd_hilite_label->texture[0].data.text.shadow_alpha
-        = theme->osd_shadow_alpha;
+            = theme->osd_shadow_alpha;
 
     theme->a_unfocused_label->texture[0].type = RR_TEXTURE_TEXT;
     theme->a_unfocused_label->texture[0].data.text.justify = winjust;
     theme->a_unfocused_label->texture[0].data.text.font
-        = theme->win_font_unfocused;
+            = theme->win_font_unfocused;
     theme->a_unfocused_label->texture[0].data.text.color
-        = theme->title_unfocused_color;
+            = theme->title_unfocused_color;
 
-    if (read_string(db, "window.inactive.label.text.font", &str))
-      {
+    if (read_string(db, "window.inactive.label.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_unfocused_label->texture[0].data.text.shadow_offset_x = i;
             theme->a_unfocused_label->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
 
             theme->title_unfocused_shadow_color = RrColorNew(inst, j, j, j);
             theme->title_unfocused_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->title_unfocused_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->title_unfocused_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_unfocused_label->texture[0].data.text.shadow_color
-        = theme->title_unfocused_shadow_color;
+            = theme->title_unfocused_shadow_color;
     theme->a_unfocused_label->texture[0].data.text.shadow_alpha
-        = theme->title_unfocused_shadow_alpha;
+            = theme->title_unfocused_shadow_alpha;
 
     theme->a_menu_text_title->texture[0].type = RR_TEXTURE_TEXT;
     theme->a_menu_text_title->texture[0].data.text.justify = mtitlejust;
     theme->a_menu_text_title->texture[0].data.text.font
-        = theme->menu_title_font;
+            = theme->menu_title_font;
     theme->a_menu_text_title->texture[0].data.text.color
-        = theme->menu_title_color;
+            = theme->menu_title_color;
 
-    if (read_string(db, "menu.title.text.font", &str))
-      {
+    if (read_string(db, "menu.title.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_menu_text_title->texture[0].data.text.shadow_offset_x = i;
             theme->a_menu_text_title->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
 
             theme->menu_title_shadow_color = RrColorNew(inst, j, j, j);
             theme->menu_title_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->menu_title_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_title_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_menu_text_title->texture[0].data.text.shadow_color
-        = theme->menu_title_shadow_color;
+            = theme->menu_title_shadow_color;
     theme->a_menu_text_title->texture[0].data.text.shadow_alpha
-        = theme->menu_title_shadow_alpha;
+            = theme->menu_title_shadow_alpha;
 
     theme->a_menu_text_normal->texture[0].type
-        = theme->a_menu_text_selected->texture[0].type
-            = theme->a_menu_text_disabled->texture[0].type
-                = theme->a_menu_text_disabled_selected->texture[0].type
-                    = RR_TEXTURE_TEXT;
+            = theme->a_menu_text_selected->texture[0].type
+                    = theme->a_menu_text_disabled->texture[0].type
+                            = theme->a_menu_text_disabled_selected->texture[0].type
+                                    = RR_TEXTURE_TEXT;
     theme->a_menu_text_normal->texture[0].data.text.justify
-        = theme->a_menu_text_selected->texture[0].data.text.justify
-            = theme->a_menu_text_disabled->texture[0].data.text.justify
-                = theme->a_menu_text_disabled_selected->texture[0].data.text.justify
-                    = RR_JUSTIFY_LEFT;
+            = theme->a_menu_text_selected->texture[0].data.text.justify
+                    = theme->a_menu_text_disabled->texture[0].data.text.justify
+                            = theme->a_menu_text_disabled_selected->texture[0].data.text.justify
+                                    = RR_JUSTIFY_LEFT;
     theme->a_menu_text_normal->texture[0].data.text.font
-        = theme->a_menu_text_selected->texture[0].data.text.font
-            = theme->a_menu_text_disabled->texture[0].data.text.font
-                = theme->a_menu_text_disabled_selected->texture[0].data.text.font
-                    = theme->menu_font;
+            = theme->a_menu_text_selected->texture[0].data.text.font
+                    = theme->a_menu_text_disabled->texture[0].data.text.font
+                            = theme->a_menu_text_disabled_selected->texture[0].data.text.font
+                                    = theme->menu_font;
     theme->a_menu_text_normal->texture[0].data.text.color = theme->menu_color;
     theme->a_menu_text_selected->texture[0].data.text.color
-        = theme->menu_selected_color;
+            = theme->menu_selected_color;
     theme->a_menu_text_disabled->texture[0].data.text.color
-        = theme->menu_disabled_color;
+            = theme->menu_disabled_color;
     theme->a_menu_text_disabled_selected->texture[0].data.text.color
-        = theme->menu_disabled_selected_color;
+            = theme->menu_disabled_selected_color;
 
-    if (read_string(db, "menu.items.font", &str))
-      {
+    if (read_string(db, "menu.items.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_menu_text_normal->
             texture[0].data.text.shadow_offset_x = i;
             theme->a_menu_text_normal->
@@ -997,9 +942,8 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
             texture[0].data.text.shadow_offset_x = i;
             theme->a_menu_text_disabled_selected->
             texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
@@ -1011,276 +955,275 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
             theme->menu_text_selected_shadow_alpha = i;
             theme->menu_text_disabled_shadow_alpha = i;
             theme->menu_text_disabled_selected_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->menu_text_normal_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_text_selected_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_text_disabled_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_text_normal_shadow_alpha = 50;
             theme->menu_text_selected_shadow_alpha = 50;
             theme->menu_text_disabled_selected_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_menu_text_normal->texture[0].data.text.shadow_color
-        = theme->menu_text_normal_shadow_color;
+            = theme->menu_text_normal_shadow_color;
     theme->a_menu_text_normal->texture[0].data.text.shadow_alpha
-        = theme->menu_text_normal_shadow_alpha;
+            = theme->menu_text_normal_shadow_alpha;
     theme->a_menu_text_selected->texture[0].data.text.shadow_color
-        = theme->menu_text_selected_shadow_color;
+            = theme->menu_text_selected_shadow_color;
     theme->a_menu_text_selected->texture[0].data.text.shadow_alpha
-        = theme->menu_text_selected_shadow_alpha;
+            = theme->menu_text_selected_shadow_alpha;
     theme->a_menu_text_disabled->texture[0].data.text.shadow_color
-        = theme->menu_text_disabled_shadow_color;
+            = theme->menu_text_disabled_shadow_color;
     theme->a_menu_text_disabled->texture[0].data.text.shadow_alpha
-        = theme->menu_text_disabled_shadow_alpha;
+            = theme->menu_text_disabled_shadow_alpha;
     theme->a_menu_text_disabled_selected->texture[0].data.text.shadow_color
-        = theme->menu_text_disabled_shadow_color;
+            = theme->menu_text_disabled_shadow_color;
     theme->a_menu_text_disabled_selected->texture[0].data.text.shadow_alpha
-        = theme->menu_text_disabled_shadow_alpha;
+            = theme->menu_text_disabled_shadow_alpha;
 
     theme->a_disabled_focused_max->texture[0].type
-        = theme->a_disabled_unfocused_max->texture[0].type
-            = theme->a_hover_focused_max->texture[0].type
-                = theme->a_hover_unfocused_max->texture[0].type
-                    = theme->a_toggled_hover_focused_max->texture[0].type
-                        = theme->a_toggled_hover_unfocused_max->texture[0].type
-                            = theme->a_toggled_focused_unpressed_max->texture[0].type
-                                = theme->a_toggled_unfocused_unpressed_max->texture[0].type
-                                    = theme->a_toggled_focused_pressed_max->texture[0].type
-                                        = theme->a_toggled_unfocused_pressed_max->texture[0].type
-                                            = theme->a_focused_unpressed_max->texture[0].type
-                                                = theme->a_focused_pressed_max->texture[0].type
-                                                    = theme->a_unfocused_unpressed_max->texture[0].type
-                                                        = theme->a_unfocused_pressed_max->texture[0].type
-                                                            = theme->a_disabled_focused_close->texture[0].type
-                                                                = theme->a_disabled_unfocused_close->texture[0].type
-                                                                    = theme->a_hover_focused_close->texture[0].type
-                                                                        = theme->a_hover_unfocused_close->texture[0].type
-                                                                            = theme->a_focused_unpressed_close->texture[0].type
-                                                                                = theme->a_focused_pressed_close->texture[0].type
-                                                                                    = theme->a_unfocused_unpressed_close->texture[0].type
-                                                                                        = theme->a_unfocused_pressed_close->texture[0].type
-                                                                                            = theme->a_disabled_focused_desk->texture[0].type
-                                                                                                = theme->a_disabled_unfocused_desk->texture[0].type
-                                                                                                    = theme->a_hover_focused_desk->texture[0].type
-                                                                                                        = theme->a_hover_unfocused_desk->texture[0].type
-                                                                                                            = theme->a_toggled_hover_focused_desk->texture[0].type
-                                                                                                                = theme->a_toggled_hover_unfocused_desk->texture[0].type
-                                                                                                                    = theme->a_toggled_focused_unpressed_desk->texture[0].type
-                                                                                                                        = theme->a_toggled_unfocused_unpressed_desk->texture[0].type
-                                                                                                                            = theme->a_toggled_focused_pressed_desk->texture[0].type
-                                                                                                                                = theme->a_toggled_unfocused_pressed_desk->texture[0].type
-                                                                                                                                    = theme->a_focused_unpressed_desk->texture[0].type
-                                                                                                                                        = theme->a_focused_pressed_desk->texture[0].type
-                                                                                                                                            = theme->a_unfocused_unpressed_desk->texture[0].type
-                                                                                                                                                = theme->a_unfocused_pressed_desk->texture[0].type
-                                                                                                                                                    = theme->a_disabled_focused_shade->texture[0].type
-                                                                                                                                                        = theme->a_disabled_unfocused_shade->texture[0].type
-                                                                                                                                                            = theme->a_hover_focused_shade->texture[0].type
-                                                                                                                                                                = theme->a_hover_unfocused_shade->texture[0].type
-                                                                                                                                                                    = theme->a_toggled_hover_focused_shade->texture[0].type
-                                                                                                                                                                        = theme->a_toggled_hover_unfocused_shade->texture[0].type
-                                                                                                                                                                            = theme->a_toggled_focused_unpressed_shade->texture[0].type
-                                                                                                                                                                                = theme->a_toggled_unfocused_unpressed_shade->texture[0].type
-                                                                                                                                                                                    = theme->a_toggled_focused_pressed_shade->texture[0].type
-                                                                                                                                                                                        = theme->a_toggled_unfocused_pressed_shade->texture[0].type
-                                                                                                                                                                                            = theme->a_focused_unpressed_shade->texture[0].type
-                                                                                                                                                                                                = theme->a_focused_pressed_shade->texture[0].type
-                                                                                                                                                                                                    = theme->a_unfocused_unpressed_shade->texture[0].type
-                                                                                                                                                                                                        = theme->a_unfocused_pressed_shade->texture[0].type
-                                                                                                                                                                                                            = theme->a_disabled_focused_iconify->texture[0].type
-                                                                                                                                                                                                                = theme->a_disabled_unfocused_iconify->texture[0].type
-                                                                                                                                                                                                                    = theme->a_hover_focused_iconify->texture[0].type
-                                                                                                                                                                                                                        = theme->a_hover_unfocused_iconify->texture[0].type
-                                                                                                                                                                                                                            = theme->a_focused_unpressed_iconify->texture[0].type
-                                                                                                                                                                                                                                = theme->a_focused_pressed_iconify->texture[0].type
-                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_iconify->texture[0].type
-                                                                                                                                                                                                                                        = theme->a_unfocused_pressed_iconify->texture[0].type
-                                                                                                                                                                                                                                            = theme->a_menu_bullet_normal->texture[0].type
-                                                                                                                                                                                                                                                = theme->a_menu_bullet_selected->texture[0].type
-                                                                                                                                                                                                                                                    = RR_TEXTURE_MASK;
+            = theme->a_disabled_unfocused_max->texture[0].type
+                    = theme->a_hover_focused_max->texture[0].type
+                            = theme->a_hover_unfocused_max->texture[0].type
+                                    = theme->a_toggled_hover_focused_max->texture[0].type
+                                            = theme->a_toggled_hover_unfocused_max->texture[0].type
+                                                    = theme->a_toggled_focused_unpressed_max->texture[0].type
+                                                            = theme->a_toggled_unfocused_unpressed_max->texture[0].type
+                                                                    = theme->a_toggled_focused_pressed_max->texture[0].type
+                                                                            = theme->a_toggled_unfocused_pressed_max->texture[0].type
+                                                                                    = theme->a_focused_unpressed_max->texture[0].type
+                                                                                            = theme->a_focused_pressed_max->texture[0].type
+                                                                                                    = theme->a_unfocused_unpressed_max->texture[0].type
+                                                                                                            = theme->a_unfocused_pressed_max->texture[0].type
+                                                                                                                    = theme->a_disabled_focused_close->texture[0].type
+                                                                                                                            = theme->a_disabled_unfocused_close->texture[0].type
+                                                                                                                                    = theme->a_hover_focused_close->texture[0].type
+                                                                                                                                            = theme->a_hover_unfocused_close->texture[0].type
+                                                                                                                                                    = theme->a_focused_unpressed_close->texture[0].type
+                                                                                                                                                            = theme->a_focused_pressed_close->texture[0].type
+                                                                                                                                                                    = theme->a_unfocused_unpressed_close->texture[0].type
+                                                                                                                                                                            = theme->a_unfocused_pressed_close->texture[0].type
+                                                                                                                                                                                    = theme->a_disabled_focused_desk->texture[0].type
+                                                                                                                                                                                            = theme->a_disabled_unfocused_desk->texture[0].type
+                                                                                                                                                                                                    = theme->a_hover_focused_desk->texture[0].type
+                                                                                                                                                                                                            = theme->a_hover_unfocused_desk->texture[0].type
+                                                                                                                                                                                                                    = theme->a_toggled_hover_focused_desk->texture[0].type
+                                                                                                                                                                                                                            = theme->a_toggled_hover_unfocused_desk->texture[0].type
+                                                                                                                                                                                                                                    = theme->a_toggled_focused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                                    = theme->a_toggled_focused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                    = theme->a_focused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                            = theme->a_focused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                                            = theme->a_unfocused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                                                    = theme->a_disabled_focused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                            = theme->a_disabled_unfocused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                    = theme->a_hover_focused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                            = theme->a_hover_unfocused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                    = theme->a_toggled_hover_focused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                            = theme->a_toggled_hover_unfocused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                    = theme->a_toggled_focused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                    = theme->a_toggled_focused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_focused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_focused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_unfocused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_disabled_focused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_disabled_unfocused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_hover_focused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_hover_unfocused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_focused_unpressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_focused_pressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_unfocused_pressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_menu_bullet_normal->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_menu_bullet_selected->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = RR_TEXTURE_MASK;
 
     theme->a_disabled_focused_max->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_max->texture[0].data.mask.mask
-            = theme->max_disabled_mask;
+            = theme->a_disabled_unfocused_max->texture[0].data.mask.mask
+                    = theme->max_disabled_mask;
     theme->a_hover_focused_max->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_max->texture[0].data.mask.mask
-            = theme->max_hover_mask;
+            = theme->a_hover_unfocused_max->texture[0].data.mask.mask
+                    = theme->max_hover_mask;
     theme->a_focused_pressed_max->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_max->texture[0].data.mask.mask
-            = theme->max_pressed_mask;
+            = theme->a_unfocused_pressed_max->texture[0].data.mask.mask
+                    = theme->max_pressed_mask;
     theme->a_focused_unpressed_max->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_max->texture[0].data.mask.mask
-            = theme->max_mask;
+            = theme->a_unfocused_unpressed_max->texture[0].data.mask.mask
+                    = theme->max_mask;
     theme->a_toggled_hover_focused_max->texture[0].data.mask.mask
-        = theme->a_toggled_hover_unfocused_max->texture[0].data.mask.mask
-            = theme->max_toggled_hover_mask;
+            = theme->a_toggled_hover_unfocused_max->texture[0].data.mask.mask
+                    = theme->max_toggled_hover_mask;
     theme->a_toggled_focused_unpressed_max->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.mask
-            = theme->max_toggled_mask;
+            = theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.mask
+                    = theme->max_toggled_mask;
     theme->a_toggled_focused_pressed_max->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.mask
-            = theme->max_toggled_pressed_mask;
+            = theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.mask
+                    = theme->max_toggled_pressed_mask;
     theme->a_disabled_focused_close->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_close->texture[0].data.mask.mask
-            = theme->close_disabled_mask;
+            = theme->a_disabled_unfocused_close->texture[0].data.mask.mask
+                    = theme->close_disabled_mask;
     theme->a_hover_focused_close->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_close->texture[0].data.mask.mask
-            = theme->close_hover_mask;
+            = theme->a_hover_unfocused_close->texture[0].data.mask.mask
+                    = theme->close_hover_mask;
     theme->a_focused_pressed_close->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_close->texture[0].data.mask.mask
-            = theme->close_pressed_mask;
+            = theme->a_unfocused_pressed_close->texture[0].data.mask.mask
+                    = theme->close_pressed_mask;
     theme->a_focused_unpressed_close->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_close->texture[0].data.mask.mask
-            = theme->close_mask;
+            = theme->a_unfocused_unpressed_close->texture[0].data.mask.mask
+                    = theme->close_mask;
     theme->a_disabled_focused_desk->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_desk->texture[0].data.mask.mask
-            = theme->desk_disabled_mask;
+            = theme->a_disabled_unfocused_desk->texture[0].data.mask.mask
+                    = theme->desk_disabled_mask;
     theme->a_hover_focused_desk->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_desk->texture[0].data.mask.mask
-            = theme->desk_hover_mask;
+            = theme->a_hover_unfocused_desk->texture[0].data.mask.mask
+                    = theme->desk_hover_mask;
     theme->a_focused_pressed_desk->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_desk->texture[0].data.mask.mask
-            = theme->desk_pressed_mask;
+            = theme->a_unfocused_pressed_desk->texture[0].data.mask.mask
+                    = theme->desk_pressed_mask;
     theme->a_focused_unpressed_desk->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_desk->texture[0].data.mask.mask
-            = theme->desk_mask;
+            = theme->a_unfocused_unpressed_desk->texture[0].data.mask.mask
+                    = theme->desk_mask;
     theme->a_toggled_hover_focused_desk->texture[0].data.mask.mask
-        = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.mask
-            = theme->desk_toggled_hover_mask;
+            = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.mask
+                    = theme->desk_toggled_hover_mask;
     theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.mask
-            = theme->desk_toggled_mask;
+            = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.mask
+                    = theme->desk_toggled_mask;
     theme->a_toggled_focused_pressed_desk->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.mask
-            = theme->desk_toggled_pressed_mask;
+            = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.mask
+                    = theme->desk_toggled_pressed_mask;
     theme->a_disabled_focused_shade->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_shade->texture[0].data.mask.mask
-            = theme->shade_disabled_mask;
+            = theme->a_disabled_unfocused_shade->texture[0].data.mask.mask
+                    = theme->shade_disabled_mask;
     theme->a_hover_focused_shade->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_shade->texture[0].data.mask.mask
-            = theme->shade_hover_mask;
+            = theme->a_hover_unfocused_shade->texture[0].data.mask.mask
+                    = theme->shade_hover_mask;
     theme->a_focused_pressed_shade->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_shade->texture[0].data.mask.mask
-            = theme->shade_pressed_mask;
+            = theme->a_unfocused_pressed_shade->texture[0].data.mask.mask
+                    = theme->shade_pressed_mask;
     theme->a_focused_unpressed_shade->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_shade->texture[0].data.mask.mask
-            = theme->shade_mask;
+            = theme->a_unfocused_unpressed_shade->texture[0].data.mask.mask
+                    = theme->shade_mask;
     theme->a_toggled_hover_focused_shade->texture[0].data.mask.mask
-        = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.mask
-            = theme->shade_toggled_hover_mask;
+            = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.mask
+                    = theme->shade_toggled_hover_mask;
     theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.mask
-            = theme->shade_toggled_mask;
+            = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.mask
+                    = theme->shade_toggled_mask;
     theme->a_toggled_focused_pressed_shade->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.mask
-            = theme->shade_toggled_pressed_mask;
+            = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.mask
+                    = theme->shade_toggled_pressed_mask;
     theme->a_disabled_focused_iconify->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_iconify->texture[0].data.mask.mask
-            = theme->iconify_disabled_mask;
+            = theme->a_disabled_unfocused_iconify->texture[0].data.mask.mask
+                    = theme->iconify_disabled_mask;
     theme->a_hover_focused_iconify->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_iconify->texture[0].data.mask.mask
-            = theme->iconify_hover_mask;
+            = theme->a_hover_unfocused_iconify->texture[0].data.mask.mask
+                    = theme->iconify_hover_mask;
     theme->a_focused_pressed_iconify->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_iconify->texture[0].data.mask.mask
-            = theme->iconify_pressed_mask;
+            = theme->a_unfocused_pressed_iconify->texture[0].data.mask.mask
+                    = theme->iconify_pressed_mask;
     theme->a_focused_unpressed_iconify->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.mask
-            = theme->iconify_mask;
+            = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.mask
+                    = theme->iconify_mask;
     theme->a_menu_bullet_normal->texture[0].data.mask.mask
-        = theme->a_menu_bullet_selected->texture[0].data.mask.mask
-            = theme->menu_bullet_mask;
+            = theme->a_menu_bullet_selected->texture[0].data.mask.mask
+                    = theme->menu_bullet_mask;
     theme->a_disabled_focused_max->texture[0].data.mask.color
-        = theme->a_disabled_focused_close->texture[0].data.mask.color
-            = theme->a_disabled_focused_desk->texture[0].data.mask.color
-                = theme->a_disabled_focused_shade->texture[0].data.mask.color
-                    = theme->a_disabled_focused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_disabled_focused_color;
+            = theme->a_disabled_focused_close->texture[0].data.mask.color
+                    = theme->a_disabled_focused_desk->texture[0].data.mask.color
+                            = theme->a_disabled_focused_shade->texture[0].data.mask.color
+                                    = theme->a_disabled_focused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_disabled_focused_color;
     theme->a_disabled_unfocused_max->texture[0].data.mask.color
-        = theme->a_disabled_unfocused_close->texture[0].data.mask.color
-            = theme->a_disabled_unfocused_desk->texture[0].data.mask.color
-                = theme->a_disabled_unfocused_shade->texture[0].data.mask.color
-                    = theme->a_disabled_unfocused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_disabled_unfocused_color;
+            = theme->a_disabled_unfocused_close->texture[0].data.mask.color
+                    = theme->a_disabled_unfocused_desk->texture[0].data.mask.color
+                            = theme->a_disabled_unfocused_shade->texture[0].data.mask.color
+                                    = theme->a_disabled_unfocused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_disabled_unfocused_color;
     theme->a_hover_focused_max->texture[0].data.mask.color
-        = theme->a_hover_focused_close->texture[0].data.mask.color
-            = theme->a_hover_focused_desk->texture[0].data.mask.color
-                = theme->a_hover_focused_shade->texture[0].data.mask.color
-                    = theme->a_hover_focused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_hover_focused_color;
+            = theme->a_hover_focused_close->texture[0].data.mask.color
+                    = theme->a_hover_focused_desk->texture[0].data.mask.color
+                            = theme->a_hover_focused_shade->texture[0].data.mask.color
+                                    = theme->a_hover_focused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_hover_focused_color;
     theme->a_hover_unfocused_max->texture[0].data.mask.color
-        = theme->a_hover_unfocused_close->texture[0].data.mask.color
-            = theme->a_hover_unfocused_desk->texture[0].data.mask.color
-                = theme->a_hover_unfocused_shade->texture[0].data.mask.color
-                    = theme->a_hover_unfocused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_hover_unfocused_color;
+            = theme->a_hover_unfocused_close->texture[0].data.mask.color
+                    = theme->a_hover_unfocused_desk->texture[0].data.mask.color
+                            = theme->a_hover_unfocused_shade->texture[0].data.mask.color
+                                    = theme->a_hover_unfocused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_hover_unfocused_color;
     theme->a_toggled_hover_focused_max->texture[0].data.mask.color
-        = theme->a_toggled_hover_focused_desk->texture[0].data.mask.color
-            = theme->a_toggled_hover_focused_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_hover_focused_color;
+            = theme->a_toggled_hover_focused_desk->texture[0].data.mask.color
+                    = theme->a_toggled_hover_focused_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_hover_focused_color;
     theme->a_toggled_hover_unfocused_max->texture[0].data.mask.color
-        = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.color
-            = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_hover_unfocused_color;
+            = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.color
+                    = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_hover_unfocused_color;
     theme->a_toggled_focused_unpressed_max->texture[0].data.mask.color
-        = theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_focused_unpressed_color;
+            = theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_focused_unpressed_color;
     theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.color
-        = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_unfocused_unpressed_color;
+            = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_unfocused_unpressed_color;
     theme->a_toggled_focused_pressed_max->texture[0].data.mask.color
-        = theme->a_toggled_focused_pressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_focused_pressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_focused_pressed_color;
+            = theme->a_toggled_focused_pressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_focused_pressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_focused_pressed_color;
     theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.color
-        = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_unfocused_pressed_color;
+            = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_unfocused_pressed_color;
     theme->a_focused_unpressed_max->texture[0].data.mask.color
-        = theme->a_focused_unpressed_close->texture[0].data.mask.color
-            = theme->a_focused_unpressed_desk->texture[0].data.mask.color
-                = theme->a_focused_unpressed_shade->texture[0].data.mask.color
-                    = theme->a_focused_unpressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_focused_unpressed_color;
+            = theme->a_focused_unpressed_close->texture[0].data.mask.color
+                    = theme->a_focused_unpressed_desk->texture[0].data.mask.color
+                            = theme->a_focused_unpressed_shade->texture[0].data.mask.color
+                                    = theme->a_focused_unpressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_focused_unpressed_color;
     theme->a_focused_pressed_max->texture[0].data.mask.color
-        = theme->a_focused_pressed_close->texture[0].data.mask.color
-            = theme->a_focused_pressed_desk->texture[0].data.mask.color
-                = theme->a_focused_pressed_shade->texture[0].data.mask.color
-                    = theme->a_focused_pressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_focused_pressed_color;
+            = theme->a_focused_pressed_close->texture[0].data.mask.color
+                    = theme->a_focused_pressed_desk->texture[0].data.mask.color
+                            = theme->a_focused_pressed_shade->texture[0].data.mask.color
+                                    = theme->a_focused_pressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_focused_pressed_color;
     theme->a_unfocused_unpressed_max->texture[0].data.mask.color
-        = theme->a_unfocused_unpressed_close->texture[0].data.mask.color
-            = theme->a_unfocused_unpressed_desk->texture[0].data.mask.color
-                = theme->a_unfocused_unpressed_shade->texture[0].data.mask.color
-                    = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_unfocused_unpressed_color;
+            = theme->a_unfocused_unpressed_close->texture[0].data.mask.color
+                    = theme->a_unfocused_unpressed_desk->texture[0].data.mask.color
+                            = theme->a_unfocused_unpressed_shade->texture[0].data.mask.color
+                                    = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_unfocused_unpressed_color;
     theme->a_unfocused_pressed_max->texture[0].data.mask.color
-        = theme->a_unfocused_pressed_close->texture[0].data.mask.color
-            = theme->a_unfocused_pressed_desk->texture[0].data.mask.color
-                = theme->a_unfocused_pressed_shade->texture[0].data.mask.color
-                    = theme->a_unfocused_pressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_unfocused_pressed_color;
+            = theme->a_unfocused_pressed_close->texture[0].data.mask.color
+                    = theme->a_unfocused_pressed_desk->texture[0].data.mask.color
+                            = theme->a_unfocused_pressed_shade->texture[0].data.mask.color
+                                    = theme->a_unfocused_pressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_unfocused_pressed_color;
     theme->a_menu_bullet_normal->texture[0].data.mask.color = theme->menu_color;
     theme->a_menu_bullet_selected->texture[0].data.mask.color
-        = theme->menu_selected_color;
+            = theme->menu_selected_color;
 
     /* set the font heights */
     theme->win_font_height = RrFontHeight(theme->win_font_focused,
-        theme->a_focused_label->texture[0].data.text.shadow_offset_y);
+            theme->a_focused_label->texture[0].data.text.shadow_offset_y);
     theme->win_font_height = MAX(theme->win_font_height, RrFontHeight(
-        theme->win_font_focused,
-        theme->a_unfocused_label->texture[0].data.text.shadow_offset_y));
+            theme->win_font_focused,
+            theme->a_unfocused_label->texture[0].data.text.shadow_offset_y));
     theme->menu_title_font_height = RrFontHeight(theme->menu_title_font,
-        theme->a_menu_text_title->texture[0].data.text.shadow_offset_y);
+            theme->a_menu_text_title->texture[0].data.text.shadow_offset_y);
     theme->menu_font_height = RrFontHeight(theme->menu_font,
-        theme->a_menu_text_normal->texture[0].data.text.shadow_offset_y);
+            theme->a_menu_text_normal->texture[0].data.text.shadow_offset_y);
 
     /* calculate some last extents */
-      {
+    {
         gint ft, fb, fl, fr, ut, ub, ul, ur;
 
         RrMargins(theme->a_focused_label, &fl, &ft, &fr, &fb);
@@ -1304,96 +1247,90 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
         RrMargins(theme->a_menu_title, &ul, &ut, &ur, &ub);
         theme->menu_title_label_height = theme->menu_title_font_height+ut+ub;
         theme->menu_title_height = theme->menu_title_label_height
-            + theme->paddingy * 2;
-      }
+                + theme->paddingy * 2;
+    }
     theme->button_size = theme->label_height - 2;
     theme->grip_width = 25;
 
     return 1;
-  }
-
+}
 
 static gchar *create_class_name(const gchar *rname)
-  {
+{
     gchar *rclass = g_strdup(rname);
     gchar *p = rclass;
 
-    while (TRUE)
-      {
+    while (TRUE) {
         *p = toupper(*p);
         p = strchr(p+1, '.');
         if (p == NULL)
-          break;
+            break;
         ++p;
         if (*p == '\0')
-          break;
-      }
+            break;
+    }
     return rclass;
-  }
+}
 
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype, *end;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = (gint)strtol(retvalue.addr, &end, 10);
         if (end != retvalue.addr)
-          ret = TRUE;
-      }
+            ret = TRUE;
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = retvalue.addr;
         ret = TRUE;
-      }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value)
-  {
+        const gchar *rname, RrColor **value)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         RrColor *c = RrColorParse(inst, retvalue.addr);
-        if (c != NULL)
-          {
+        if (c != NULL) {
             *value = c;
             ret = TRUE;
-          }
-      }
+        }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
-  {
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
+{
     gboolean ret = FALSE;
     gchar *s;
     gint hx, hy; /* ignored */
@@ -1401,89 +1338,82 @@ static gboolean read_mask(const RrInstance *inst, const gchar *path,
     guchar *b;
 
     s = g_build_filename(path, maskname, NULL);
-    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess)
-      {
+    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) {
         ret = TRUE;
         *value = RrPixmapMaskNew(inst, w, h, (gchar*)b);
         XFree(b);
-      }
+    }
     g_free(s);
 
     return ret;
-  }
+}
 
 static void parse_appearance(gchar *tex, RrSurfaceColorType *grad,
-    RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
-    gboolean *border, gboolean allow_trans)
-  {
+        RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
+        gboolean *border, gboolean allow_trans)
+{
     gchar *t;
 
     /* convert to all lowercase */
     for (t = tex; *t != '\0'; ++t)
-      *t = g_ascii_tolower(*t);
+        *t = g_ascii_tolower(*t);
 
-    if (allow_trans && strstr(tex, "parentrelative") != NULL)
-      {
+    if (allow_trans && strstr(tex, "parentrelative") != NULL) {
         *grad = RR_SURFACE_PARENTREL;
-      }
-    else
-      {
-        if (strstr(tex, "gradient") != NULL)
-          {
+    }
+    else {
+        if (strstr(tex, "gradient") != NULL) {
             if (strstr(tex, "crossdiagonal") != NULL)
-              *grad = RR_SURFACE_CROSS_DIAGONAL;
+                *grad = RR_SURFACE_CROSS_DIAGONAL;
             else if (strstr(tex, "pyramid") != NULL)
-              *grad = RR_SURFACE_PYRAMID;
+                *grad = RR_SURFACE_PYRAMID;
             else if (strstr(tex, "mirrorhorizontal") != NULL)
-              *grad = RR_SURFACE_MIRROR_HORIZONTAL;
+                *grad = RR_SURFACE_MIRROR_HORIZONTAL;
             else if (strstr(tex, "horizontal") != NULL)
-              *grad = RR_SURFACE_HORIZONTAL;
+                *grad = RR_SURFACE_HORIZONTAL;
             else if (strstr(tex, "splitvertical") != NULL)
-              *grad = RR_SURFACE_SPLIT_VERTICAL;
+                *grad = RR_SURFACE_SPLIT_VERTICAL;
             else if (strstr(tex, "vertical") != NULL)
-              *grad = RR_SURFACE_VERTICAL;
+                *grad = RR_SURFACE_VERTICAL;
             else
-              *grad = RR_SURFACE_DIAGONAL;
-          }
-        else
-          {
+                *grad = RR_SURFACE_DIAGONAL;
+        }
+        else {
             *grad = RR_SURFACE_SOLID;
-          }
-      }
+        }
+    }
 
     if (strstr(tex, "sunken") != NULL)
-      *relief = RR_RELIEF_SUNKEN;
+        *relief = RR_RELIEF_SUNKEN;
     else if (strstr(tex, "flat") != NULL)
-      *relief = RR_RELIEF_FLAT;
+        *relief = RR_RELIEF_FLAT;
     else if (strstr(tex, "raised") != NULL)
-      *relief = RR_RELIEF_RAISED;
+        *relief = RR_RELIEF_RAISED;
     else
-      *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
-          : RR_RELIEF_RAISED;
+        *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
+                : RR_RELIEF_RAISED;
 
     *border = FALSE;
-    if (*relief == RR_RELIEF_FLAT)
-      {
+    if (*relief == RR_RELIEF_FLAT) {
         if (strstr(tex, "border") != NULL)
-          *border = TRUE;
-      }
-    else
-      {
+            *border = TRUE;
+    }
+    else {
         if (strstr(tex, "bevel2") != NULL)
-          *bevel = RR_BEVEL_2;
+            *bevel = RR_BEVEL_2;
         else
-          *bevel = RR_BEVEL_1;
-      }
+            *bevel = RR_BEVEL_1;
+    }
 
     if (strstr(tex, "interlaced") != NULL)
-      *interlaced = TRUE;
+        *interlaced = TRUE;
     else
-      *interlaced = FALSE;
-  }
+        *interlaced = FALSE;
+}
 
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans)
-  {
+        const gchar *rname, RrAppearance *value, gboolean allow_trans)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *cname, *ctoname, *bcname, *icname, *hname, *sname;
@@ -1502,32 +1432,29 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     ctosplitname = g_strconcat(rname, ".colorTo.splitTo", NULL);
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         parse_appearance(retvalue.addr, &value->surface.grad,
-            &value->surface.relief, &value->surface.bevel,
-            &value->surface.interlaced, &value->surface.border, allow_trans);
+                &value->surface.relief, &value->surface.bevel,
+                &value->surface.interlaced, &value->surface.border, allow_trans);
         if (!read_color(db, inst, cname, &value->surface.primary))
-          value->surface.primary = RrColorNew(inst, 0, 0, 0);
+            value->surface.primary = RrColorNew(inst, 0, 0, 0);
         if (!read_color(db, inst, ctoname, &value->surface.secondary))
-          value->surface.secondary = RrColorNew(inst, 0, 0, 0);
+            value->surface.secondary = RrColorNew(inst, 0, 0, 0);
         if (value->surface.border)
-          if (!read_color(db, inst, bcname, &value->surface.border_color))
-            value->surface.border_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, bcname, &value->surface.border_color))
+                value->surface.border_color = RrColorNew(inst, 0, 0, 0);
         if (value->surface.interlaced)
-          if (!read_color(db, inst, icname, &value->surface.interlace_color))
-            value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, icname, &value->surface.interlace_color))
+                value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
         if (read_int(db, hname, &i) && i >= 0)
-          value->surface.bevel_light_adjust = i;
+            value->surface.bevel_light_adjust = i;
         if (read_int(db, sname, &i) && i >= 0 && i <= 256)
-          value->surface.bevel_dark_adjust = i;
+            value->surface.bevel_dark_adjust = i;
 
-        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL)
-          {
+        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL) {
             gint r, g, b;
 
-            if (!read_color(db, inst, csplitname, &value->surface.split_primary))
-              {
+            if (!read_color(db, inst, csplitname, &value->surface.split_primary)) {
                 r = value->surface.primary->r;
                 r += r >> 2;
                 g = value->surface.primary->g;
@@ -1535,17 +1462,16 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.primary->b;
                 b += b >> 2;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_primary = RrColorNew(inst, r, g, b);
-              }
+            }
 
             if (!read_color(db, inst, ctosplitname,
-                &value->surface.split_secondary))
-              {
+                    &value->surface.split_secondary)) {
                 r = value->surface.secondary->r;
                 r += r >> 4;
                 g = value->surface.secondary->g;
@@ -1553,17 +1479,17 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.secondary->b;
                 b += b >> 4;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_secondary = RrColorNew(inst, r, g, b);
-              }
-          }
+            }
+        }
 
         ret = TRUE;
-      }
+    }
 
     g_free(ctosplitname);
     g_free(csplitname);
@@ -1575,25 +1501,24 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     g_free(cname);
     g_free(rclass);
     return ret;
-  }
+}
 
 static int parse_inline_number(const char *p)
-  {
+{
     int neg = 1;
     int res = 0;
-    if (*p == '-')
-      {
+    if (*p == '-') {
         neg = -1;
         ++p;
-      }
+    }
     for (; isdigit(*p); ++p)
-      res = res * 10 + *p - '0';
+        res = res * 10 + *p - '0';
     res *= neg;
     return res;
-  }
+}
 
 static void set_default_appearance(RrAppearance *a)
-  {
+{
     a->surface.grad = RR_SURFACE_SOLID;
     a->surface.relief = RR_RELIEF_FLAT;
     a->surface.bevel = RR_BEVEL_1;
@@ -1601,28 +1526,27 @@ static void set_default_appearance(RrAppearance *a)
     a->surface.border = FALSE;
     a->surface.primary = RrColorNew(a->inst, 0, 0, 0);
     a->surface.secondary = RrColorNew(a->inst, 0, 0, 0);
-  }
+}
 
 /* Reads the output from gimp's C-Source file format into valid RGBA data for
  an RrTextureRGBA. */
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data)
-  {
+{
     RrPixel32 *im, *p;
     gint i;
 
     p = im = g_memdup(data, width * height * sizeof(RrPixel32));
 
-    for (i = 0; i < width * height; ++i)
-      {
+    for (i = 0; i < width * height; ++i) {
         guchar a = ((*p >> 24) & 0xff);
         guchar b = ((*p >> 16) & 0xff);
         guchar g = ((*p >> 8) & 0xff);
         guchar r = ((*p >> 0) & 0xff);
 
         *p = ((r << RrDefaultRedOffset) + (g << RrDefaultGreenOffset) + (b
-            << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
+                << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
         p++;
-      }
+    }
 
     return im;
-  }
+}
diff --git a/engines/default/config.h b/engines/default/config.h
index d2bbb85..5601604 100644
--- a/engines/default/config.h
+++ b/engines/default/config.h
@@ -25,7 +25,7 @@
 G_BEGIN_DECLS
 
 struct _ObFrameThemeConfig
-  {
+{
     const RrInstance *inst;
 
     /* style settings - fonts */
@@ -234,16 +234,16 @@ struct _ObFrameThemeConfig
     RrAppearance *osd_unhilite_fg; /* can never be parent relative */
 
     gchar *name;
-  };
+};
 
 typedef struct _ObFrameThemeConfig ObFrameThemeConfig;
 
 /*! The font values are all optional. If a NULL is used for any of them, then
  the default font will be used. */
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font);
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font);
 
 G_END_DECLS
 
diff --git a/engines/default/plugin.c b/engines/default/plugin.c
index b0b0af8..b1b3dad 100644
--- a/engines/default/plugin.c
+++ b/engines/default/plugin.c
@@ -34,11 +34,11 @@
 
 typedef enum
 {
-	OB_FLAG_MAX = 1 << 0,
-	OB_FLAG_CLOSE = 1 << 1,
-	OB_FLAG_DESK = 1 << 2,
-	OB_FLAG_SHADE = 1 << 3,
-	OB_FLAG_ICONIFY = 1 << 4
+    OB_FLAG_MAX = 1 << 0,
+    OB_FLAG_CLOSE = 1 << 1,
+    OB_FLAG_DESK = 1 << 2,
+    OB_FLAG_SHADE = 1 << 3,
+    OB_FLAG_ICONIFY = 1 << 4
 } ObFrameFlags;
 
 #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
@@ -54,1685 +54,1777 @@ typedef enum
 #define FRAME_HANDLE_Y(f) (f->size.top + f->client_area.height + f->cbwidth_b)
 
 Window createWindow(Window parent, Visual *visual, gulong mask,
-		XSetWindowAttributes *attrib) {
-	return XCreateWindow(plugin.ob_display, parent, 0, 0, 1, 1, 0, (visual ? 32
-			: RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
-			: RrVisual(plugin.ob_rr_inst)), mask, attrib);
+        XSetWindowAttributes *attrib)
+{
+    return XCreateWindow(plugin.ob_display, parent, 0, 0, 1, 1, 0, (visual ? 32
+            : RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
+            : RrVisual(plugin.ob_rr_inst)), mask, attrib);
 
 }
 
-Visual *check_32bit_client(ObClient *c) {
-	XWindowAttributes wattrib;
-	Status ret;
+Visual *check_32bit_client(ObClient *c)
+{
+    XWindowAttributes wattrib;
+    Status ret;
 
-	/* we're already running at 32 bit depth, yay. we don't need to use their
-	 visual */
-	if (RrDepth(plugin.ob_rr_inst) == 32)
-		return NULL;
+    /* we're already running at 32 bit depth, yay. we don't need to use their
+     visual */
+    if (RrDepth(plugin.ob_rr_inst) == 32)
+        return NULL;
 
-	ret = XGetWindowAttributes(plugin.ob_display, c->window, &wattrib);
-	g_assert(ret != BadDrawable);
-	g_assert(ret != BadWindow);
+    ret = XGetWindowAttributes(plugin.ob_display, c->window, &wattrib);
+    g_assert(ret != BadDrawable);
+    g_assert(ret != BadWindow);
 
-	if (wattrib.depth == 32)
-		return wattrib.visual;
-	return NULL;
+    if (wattrib.depth == 32)
+        return wattrib.visual;
+    return NULL;
 }
 
 /* Not used */
-gint init(Display * display, gint screen) {
-	plugin.ob_display = display;
-	plugin.ob_screen = screen;
+gint init(Display * display, gint screen)
+{
+    plugin.ob_display = display;
+    plugin.ob_screen = screen;
 }
 
-gpointer frame_new(struct _ObClient * client) {
-	XSetWindowAttributes attrib;
-	gulong mask;
-	ObDefaultFrame *self;
-	Visual *visual;
-
-	self = g_new0(ObDefaultFrame, 1);
-	self->client = client;
-
-	visual = check_32bit_client(client);
-
-	/* create the non-visible decor windows */
-
-	mask = 0;
-	if (visual) {
-		/* client has a 32-bit visual */
-		mask |= CWColormap | CWBackPixel | CWBorderPixel;
-		/* create a colormap with the visual */
-		OBDEFAULTFRAME(self)->colormap = attrib.colormap = XCreateColormap(
-				plugin.ob_display, RootWindow(plugin.ob_display,
-						plugin.ob_screen), visual, AllocNone);
-		attrib.background_pixel = BlackPixel(plugin.ob_display,
-				plugin.ob_screen);
-		attrib.border_pixel = BlackPixel(plugin.ob_display, plugin.ob_screen);
-	}
-	self->window = createWindow(
-			RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask,
-			&attrib);
-
-	/* create the visible decor windows */
-
-	mask = 0;
-	if (visual) {
-		/* client has a 32-bit visual */
-		mask |= CWColormap | CWBackPixel | CWBorderPixel;
-		attrib.colormap = RrColormap(plugin.ob_rr_inst);
-	}
-
-	self->backback = createWindow(self->window, NULL, mask, &attrib);
-	self->backfront = createWindow(self->backback, NULL, mask, &attrib);
-
-	mask |= CWEventMask;
-	attrib.event_mask = ELEMENT_EVENTMASK;
-	self->innerleft = createWindow(self->window, NULL, mask, &attrib);
-	self->innertop = createWindow(self->window, NULL, mask, &attrib);
-	self->innerright = createWindow(self->window, NULL, mask, &attrib);
-	self->innerbottom = createWindow(self->window, NULL, mask, &attrib);
-
-	self->innerblb = createWindow(self->innerbottom, NULL, mask, &attrib);
-	self->innerbrb = createWindow(self->innerbottom, NULL, mask, &attrib);
-	self->innerbll = createWindow(self->innerleft, NULL, mask, &attrib);
-	self->innerbrr = createWindow(self->innerright, NULL, mask, &attrib);
-
-	self->title = createWindow(self->window, NULL, mask, &attrib);
-	self->titleleft = createWindow(self->window, NULL, mask, &attrib);
-	self->titletop = createWindow(self->window, NULL, mask, &attrib);
-	self->titletopleft = createWindow(self->window, NULL, mask, &attrib);
-	self->titletopright = createWindow(self->window, NULL, mask, &attrib);
-	self->titleright = createWindow(self->window, NULL, mask, &attrib);
-	self->titlebottom = createWindow(self->window, NULL, mask, &attrib);
-
-	self->topresize = createWindow(self->title, NULL, mask, &attrib);
-	self->tltresize = createWindow(self->title, NULL, mask, &attrib);
-	self->tllresize = createWindow(self->title, NULL, mask, &attrib);
-	self->trtresize = createWindow(self->title, NULL, mask, &attrib);
-	self->trrresize = createWindow(self->title, NULL, mask, &attrib);
-
-	self->left = createWindow(self->window, NULL, mask, &attrib);
-	self->right = createWindow(self->window, NULL, mask, &attrib);
-
-	self->label = createWindow(self->title, NULL, mask, &attrib);
-	self->max = createWindow(self->title, NULL, mask, &attrib);
-	self->close = createWindow(self->title, NULL, mask, &attrib);
-	self->desk = createWindow(self->title, NULL, mask, &attrib);
-	self->shade = createWindow(self->title, NULL, mask, &attrib);
-	self->icon = createWindow(self->title, NULL, mask, &attrib);
-	self->iconify = createWindow(self->title, NULL, mask, &attrib);
-
-	self->handle = createWindow(self->window, NULL, mask, &attrib);
-	self->lgrip = createWindow(self->handle, NULL, mask, &attrib);
-	self->rgrip = createWindow(self->handle, NULL, mask, &attrib);
-
-	self->handleleft = createWindow(self->handle, NULL, mask, &attrib);
-	self->handleright = createWindow(self->handle, NULL, mask, &attrib);
-
-	self->handletop = createWindow(self->window, NULL, mask, &attrib);
-	self->handlebottom = createWindow(self->window, NULL, mask, &attrib);
-	self->lgripleft = createWindow(self->window, NULL, mask, &attrib);
-	self->lgriptop = createWindow(self->window, NULL, mask, &attrib);
-	self->lgripbottom = createWindow(self->window, NULL, mask, &attrib);
-	self->rgripright = createWindow(self->window, NULL, mask, &attrib);
-	self->rgriptop = createWindow(self->window, NULL, mask, &attrib);
-	self->rgripbottom = createWindow(self->window, NULL, mask, &attrib);
-
-	self->focused = FALSE;
-
-	/* the other stuff is shown based on decor settings */
-	XMapWindow(plugin.ob_display, self->label);
-	XMapWindow(plugin.ob_display, self->backback);
-	XMapWindow(plugin.ob_display, self->backfront);
-
-	self->hover_flag = OB_BUTTON_NONE;
-	self->press_flag = OB_BUTTON_NONE;
-
-	set_theme_statics(self);
-
-	return self;
+gpointer frame_new(struct _ObClient * client)
+{
+    XSetWindowAttributes attrib;
+    gulong mask;
+    ObDefaultFrame *self;
+    Visual *visual;
+
+    self = g_new0(ObDefaultFrame, 1);
+    self->client = client;
+
+    visual = check_32bit_client(client);
+
+    /* create the non-visible decor windows */
+
+    mask = 0;
+    if (visual) {
+        /* client has a 32-bit visual */
+        mask |= CWColormap | CWBackPixel | CWBorderPixel;
+        /* create a colormap with the visual */
+        OBDEFAULTFRAME(self)->colormap = attrib.colormap = XCreateColormap(
+                plugin.ob_display, RootWindow(plugin.ob_display,
+                        plugin.ob_screen), visual, AllocNone);
+        attrib.background_pixel = BlackPixel(plugin.ob_display,
+                plugin.ob_screen);
+        attrib.border_pixel = BlackPixel(plugin.ob_display, plugin.ob_screen);
+    }
+    self->window = createWindow(
+            RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask,
+            &attrib);
+
+    /* create the visible decor windows */
+
+    mask = 0;
+    if (visual) {
+        /* client has a 32-bit visual */
+        mask |= CWColormap | CWBackPixel | CWBorderPixel;
+        attrib.colormap = RrColormap(plugin.ob_rr_inst);
+    }
+
+    self->backback = createWindow(self->window, NULL, mask, &attrib);
+    self->backfront = createWindow(self->backback, NULL, mask, &attrib);
+
+    mask |= CWEventMask;
+    attrib.event_mask = ELEMENT_EVENTMASK;
+    self->innerleft = createWindow(self->window, NULL, mask, &attrib);
+    self->innertop = createWindow(self->window, NULL, mask, &attrib);
+    self->innerright = createWindow(self->window, NULL, mask, &attrib);
+    self->innerbottom = createWindow(self->window, NULL, mask, &attrib);
+
+    self->innerblb = createWindow(self->innerbottom, NULL, mask, &attrib);
+    self->innerbrb = createWindow(self->innerbottom, NULL, mask, &attrib);
+    self->innerbll = createWindow(self->innerleft, NULL, mask, &attrib);
+    self->innerbrr = createWindow(self->innerright, NULL, mask, &attrib);
+
+    self->title = createWindow(self->window, NULL, mask, &attrib);
+    self->titleleft = createWindow(self->window, NULL, mask, &attrib);
+    self->titletop = createWindow(self->window, NULL, mask, &attrib);
+    self->titletopleft = createWindow(self->window, NULL, mask, &attrib);
+    self->titletopright = createWindow(self->window, NULL, mask, &attrib);
+    self->titleright = createWindow(self->window, NULL, mask, &attrib);
+    self->titlebottom = createWindow(self->window, NULL, mask, &attrib);
+
+    self->topresize = createWindow(self->title, NULL, mask, &attrib);
+    self->tltresize = createWindow(self->title, NULL, mask, &attrib);
+    self->tllresize = createWindow(self->title, NULL, mask, &attrib);
+    self->trtresize = createWindow(self->title, NULL, mask, &attrib);
+    self->trrresize = createWindow(self->title, NULL, mask, &attrib);
+
+    self->left = createWindow(self->window, NULL, mask, &attrib);
+    self->right = createWindow(self->window, NULL, mask, &attrib);
+
+    self->label = createWindow(self->title, NULL, mask, &attrib);
+    self->max = createWindow(self->title, NULL, mask, &attrib);
+    self->close = createWindow(self->title, NULL, mask, &attrib);
+    self->desk = createWindow(self->title, NULL, mask, &attrib);
+    self->shade = createWindow(self->title, NULL, mask, &attrib);
+    self->icon = createWindow(self->title, NULL, mask, &attrib);
+    self->iconify = createWindow(self->title, NULL, mask, &attrib);
+
+    self->handle = createWindow(self->window, NULL, mask, &attrib);
+    self->lgrip = createWindow(self->handle, NULL, mask, &attrib);
+    self->rgrip = createWindow(self->handle, NULL, mask, &attrib);
+
+    self->handleleft = createWindow(self->handle, NULL, mask, &attrib);
+    self->handleright = createWindow(self->handle, NULL, mask, &attrib);
+
+    self->handletop = createWindow(self->window, NULL, mask, &attrib);
+    self->handlebottom = createWindow(self->window, NULL, mask, &attrib);
+    self->lgripleft = createWindow(self->window, NULL, mask, &attrib);
+    self->lgriptop = createWindow(self->window, NULL, mask, &attrib);
+    self->lgripbottom = createWindow(self->window, NULL, mask, &attrib);
+    self->rgripright = createWindow(self->window, NULL, mask, &attrib);
+    self->rgriptop = createWindow(self->window, NULL, mask, &attrib);
+    self->rgripbottom = createWindow(self->window, NULL, mask, &attrib);
+
+    self->focused = FALSE;
+
+    /* the other stuff is shown based on decor settings */
+    XMapWindow(plugin.ob_display, self->label);
+    XMapWindow(plugin.ob_display, self->backback);
+    XMapWindow(plugin.ob_display, self->backfront);
+
+    self->hover_flag = OB_BUTTON_NONE;
+    self->press_flag = OB_BUTTON_NONE;
+
+    set_theme_statics(self);
+
+    return self;
 }
 
-void set_theme_statics(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	/* set colors/appearance/sizes for stuff that doesn't change */
-	XResizeWindow(plugin.ob_display, self->max, theme_config.button_size,
-			theme_config.button_size);
-	XResizeWindow(plugin.ob_display, self->iconify, theme_config.button_size,
-			theme_config.button_size);
-	XResizeWindow(plugin.ob_display, self->icon, theme_config.button_size + 2,
-			theme_config.button_size + 2);
-	XResizeWindow(plugin.ob_display, self->close, theme_config.button_size,
-			theme_config.button_size);
-	XResizeWindow(plugin.ob_display, self->desk, theme_config.button_size,
-			theme_config.button_size);
-	XResizeWindow(plugin.ob_display, self->shade, theme_config.button_size,
-			theme_config.button_size);
-	XResizeWindow(plugin.ob_display, self->tltresize, theme_config.grip_width,
-			theme_config.paddingy + 1);
-	XResizeWindow(plugin.ob_display, self->trtresize, theme_config.grip_width,
-			theme_config.paddingy + 1);
-	XResizeWindow(plugin.ob_display, self->tllresize,
-			theme_config.paddingx + 1, theme_config.title_height);
-	XResizeWindow(plugin.ob_display, self->trrresize,
-			theme_config.paddingx + 1, theme_config.title_height);
-
-	/* set up the dynamic appearances */
-	self->a_unfocused_title = RrAppearanceCopy(theme_config.a_unfocused_title);
-	self->a_focused_title = RrAppearanceCopy(theme_config.a_focused_title);
-	self->a_unfocused_label = RrAppearanceCopy(theme_config.a_unfocused_label);
-	self->a_focused_label = RrAppearanceCopy(theme_config.a_focused_label);
-	self->a_unfocused_handle
-			= RrAppearanceCopy(theme_config.a_unfocused_handle);
-	self->a_focused_handle = RrAppearanceCopy(theme_config.a_focused_handle);
-	self->a_icon = RrAppearanceCopy(theme_config.a_icon);
+void set_theme_statics(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    /* set colors/appearance/sizes for stuff that doesn't change */
+    XResizeWindow(plugin.ob_display, self->max, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->iconify, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->icon, theme_config.button_size + 2,
+            theme_config.button_size + 2);
+    XResizeWindow(plugin.ob_display, self->close, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->desk, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->shade, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->tltresize, theme_config.grip_width,
+            theme_config.paddingy + 1);
+    XResizeWindow(plugin.ob_display, self->trtresize, theme_config.grip_width,
+            theme_config.paddingy + 1);
+    XResizeWindow(plugin.ob_display, self->tllresize,
+            theme_config.paddingx + 1, theme_config.title_height);
+    XResizeWindow(plugin.ob_display, self->trrresize,
+            theme_config.paddingx + 1, theme_config.title_height);
+
+    /* set up the dynamic appearances */
+    self->a_unfocused_title = RrAppearanceCopy(theme_config.a_unfocused_title);
+    self->a_focused_title = RrAppearanceCopy(theme_config.a_focused_title);
+    self->a_unfocused_label = RrAppearanceCopy(theme_config.a_unfocused_label);
+    self->a_focused_label = RrAppearanceCopy(theme_config.a_focused_label);
+    self->a_unfocused_handle
+            = RrAppearanceCopy(theme_config.a_unfocused_handle);
+    self->a_focused_handle = RrAppearanceCopy(theme_config.a_focused_handle);
+    self->a_icon = RrAppearanceCopy(theme_config.a_icon);
 }
 
-void free_theme_statics(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _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 free_theme_statics(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _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(gpointer self) {
-	free_theme_statics(OBDEFAULTFRAME(self));
-	XDestroyWindow(plugin.ob_display, OBDEFAULTFRAME(self)->window);
-	if (OBDEFAULTFRAME(self)->colormap)
-		XFreeColormap(plugin.ob_display, OBDEFAULTFRAME(self)->colormap);
-	g_free(self);
+void frame_free(gpointer self)
+{
+    free_theme_statics(OBDEFAULTFRAME(self));
+    XDestroyWindow(plugin.ob_display, OBDEFAULTFRAME(self)->window);
+    if (OBDEFAULTFRAME(self)->colormap)
+        XFreeColormap(plugin.ob_display, OBDEFAULTFRAME(self)->colormap);
+    g_free(self);
 }
 
-void frame_show(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	if (!self->visible) {
-		self->visible = TRUE;
-		frame_update_skin(self);
-		/* Grab the server to make sure that the frame window is mapped before
-		 the client gets its MapNotify, i.e. to make sure the client is
-		 _visible_ when it gets MapNotify. */
-		grab_server(TRUE);
-		XMapWindow(plugin.ob_display, self->client->window);
-		XMapWindow(plugin.ob_display, self->window);
-		grab_server(FALSE);
-	}
+void frame_show(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    if (!self->visible) {
+        self->visible = TRUE;
+        frame_update_skin(self);
+        /* Grab the server to make sure that the frame window is mapped before
+         the client gets its MapNotify, i.e. to make sure the client is
+         _visible_ when it gets MapNotify. */
+        grab_server(TRUE);
+        XMapWindow(plugin.ob_display, self->client->window);
+        XMapWindow(plugin.ob_display, self->window);
+        grab_server(FALSE);
+    }
 }
 
-gint frame_hide(gpointer self) {
-	if (OBDEFAULTFRAME(self)->visible) {
-		OBDEFAULTFRAME(self)->visible = FALSE;
-		if (!frame_iconify_animating(self))
-			XUnmapWindow(plugin.ob_display, OBDEFAULTFRAME(self)->window);
-		/* we unmap the client itself so that we can get MapRequest
-		 events, and because the ICCCM tells us to! */
-		XUnmapWindow(plugin.ob_display, OBDEFAULTFRAME(self)->client->window);
-		return 1;
-	} else {
-		return 0;
-	}
+gint frame_hide(gpointer self)
+{
+    if (OBDEFAULTFRAME(self)->visible) {
+        OBDEFAULTFRAME(self)->visible = FALSE;
+        if (!frame_iconify_animating(self))
+            XUnmapWindow(plugin.ob_display, OBDEFAULTFRAME(self)->window);
+        /* we unmap the client itself so that we can get MapRequest
+         events, and because the ICCCM tells us to! */
+        XUnmapWindow(plugin.ob_display, OBDEFAULTFRAME(self)->client->window);
+        return 1;
+    }
+    else {
+        return 0;
+    }
 }
 
-void frame_adjust_theme(gpointer self) {
-	free_theme_statics(self);
-	set_theme_statics(self);
+void frame_adjust_theme(gpointer self)
+{
+    free_theme_statics(self);
+    set_theme_statics(self);
 }
 
-void frame_adjust_shape(gpointer _self) {
+void frame_adjust_shape(gpointer _self)
+{
 #ifdef SHAPE
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	gint num;
-	XRectangle xrect[2];
-
-	if (!self->client->shaped)
-	{
-		/* clear the shape on the frame window */
-		XShapeCombineMask(plugin.ob_display, self->window, ShapeBounding,
-				self->size.left,
-				self->size.top,
-				None, ShapeSet);
-	}
-	else
-	{
-		/* make the frame's shape match the clients */
-		XShapeCombineShape(plugin.ob_display, self->window, ShapeBounding,
-				self->size.left,
-				self->size.top,
-				self->client->window,
-				ShapeBounding, ShapeSet);
-
-		num = 0;
-		if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-		{
-			xrect[0].x = 0;
-			xrect[0].y = 0;
-			xrect[0].width = self->area.width;
-			xrect[0].height = self->size.top;
-			++num;
-		}
-
-		if (self->decorations & OB_FRAME_DECOR_HANDLE &&
-				theme_config.handle_height> 0)
-		{
-			xrect[1].x = 0;
-			xrect[1].y = FRAME_HANDLE_Y(self);
-			xrect[1].width = self->area.width;
-			xrect[1].height = theme_config.handle_height +
-			self->bwidth * 2;
-			++num;
-		}
-
-		XShapeCombineRectangles(plugin.ob_display, self->window,
-				ShapeBounding, 0, 0, xrect, num,
-				ShapeUnion, Unsorted);
-	}
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    gint num;
+    XRectangle xrect[2];
+
+    if (!self->client->shaped)
+    {
+        /* clear the shape on the frame window */
+        XShapeCombineMask(plugin.ob_display, self->window, ShapeBounding,
+                self->size.left,
+                self->size.top,
+                None, ShapeSet);
+    }
+    else
+    {
+        /* make the frame's shape match the clients */
+        XShapeCombineShape(plugin.ob_display, self->window, ShapeBounding,
+                self->size.left,
+                self->size.top,
+                self->client->window,
+                ShapeBounding, ShapeSet);
+
+        num = 0;
+        if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
+        {
+            xrect[0].x = 0;
+            xrect[0].y = 0;
+            xrect[0].width = self->area.width;
+            xrect[0].height = self->size.top;
+            ++num;
+        }
+
+        if (self->decorations & OB_FRAME_DECOR_HANDLE &&
+                theme_config.handle_height> 0)
+        {
+            xrect[1].x = 0;
+            xrect[1].y = FRAME_HANDLE_Y(self);
+            xrect[1].width = self->area.width;
+            xrect[1].height = theme_config.handle_height +
+            self->bwidth * 2;
+            ++num;
+        }
+
+        XShapeCombineRectangles(plugin.ob_display, self->window,
+                ShapeBounding, 0, 0, xrect, num,
+                ShapeUnion, Unsorted);
+    }
 #endif
 }
 
-void frame_grab(gpointer _self, GHashTable * window_map) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	/* DO NOT map the client window here. we used to do that, but it is bogus.
-	 we need to set up the client's dimensions and everything before we
-	 send a mapnotify or we create race conditions.
-	 */
-
-	/* reparent the client to the frame */
-	XReparentWindow(plugin.ob_display, self->client->window, self->window, 0, 0);
-
-	/*
-	 When reparenting the client window, it is usually not mapped yet, since
-	 this occurs from a MapRequest. However, in the case where Openbox is
-	 starting up, the window is already mapped, so we'll see an unmap event
-	 for it.
-	 */
-	if (ob_state() == OB_STATE_STARTING)
-		++self->client->ignore_unmaps;
-
-	/* select the event mask on the client's parent (to receive config/map
-	 req's) the ButtonPress is to catch clicks on the client border */
-	XSelectInput(plugin.ob_display, self->window, FRAME_EVENTMASK);
-
-	/* set all the windows for the frame in the window_map */
-	g_hash_table_insert(window_map, &self->window, self->client);
-	g_hash_table_insert(window_map, &self->backback, self->client);
-	g_hash_table_insert(window_map, &self->backfront, self->client);
-	g_hash_table_insert(window_map, &self->innerleft, self->client);
-	g_hash_table_insert(window_map, &self->innertop, self->client);
-	g_hash_table_insert(window_map, &self->innerright, self->client);
-	g_hash_table_insert(window_map, &self->innerbottom, self->client);
-	g_hash_table_insert(window_map, &self->title, self->client);
-	g_hash_table_insert(window_map, &self->label, self->client);
-	g_hash_table_insert(window_map, &self->max, self->client);
-	g_hash_table_insert(window_map, &self->close, self->client);
-	g_hash_table_insert(window_map, &self->desk, self->client);
-	g_hash_table_insert(window_map, &self->shade, self->client);
-	g_hash_table_insert(window_map, &self->icon, self->client);
-	g_hash_table_insert(window_map, &self->iconify, self->client);
-	g_hash_table_insert(window_map, &self->handle, self->client);
-	g_hash_table_insert(window_map, &self->lgrip, self->client);
-	g_hash_table_insert(window_map, &self->rgrip, self->client);
-	g_hash_table_insert(window_map, &self->topresize, self->client);
-	g_hash_table_insert(window_map, &self->tltresize, self->client);
-	g_hash_table_insert(window_map, &self->tllresize, self->client);
-	g_hash_table_insert(window_map, &self->trtresize, self->client);
-	g_hash_table_insert(window_map, &self->trrresize, self->client);
-	g_hash_table_insert(window_map, &self->left, self->client);
-	g_hash_table_insert(window_map, &self->right, self->client);
-	g_hash_table_insert(window_map, &self->titleleft, self->client);
-	g_hash_table_insert(window_map, &self->titletop, self->client);
-	g_hash_table_insert(window_map, &self->titletopleft, self->client);
-	g_hash_table_insert(window_map, &self->titletopright, self->client);
-	g_hash_table_insert(window_map, &self->titleright, self->client);
-	g_hash_table_insert(window_map, &self->titlebottom, self->client);
-	g_hash_table_insert(window_map, &self->handleleft, self->client);
-	g_hash_table_insert(window_map, &self->handletop, self->client);
-	g_hash_table_insert(window_map, &self->handleright, self->client);
-	g_hash_table_insert(window_map, &self->handlebottom, self->client);
-	g_hash_table_insert(window_map, &self->lgripleft, self->client);
-	g_hash_table_insert(window_map, &self->lgriptop, self->client);
-	g_hash_table_insert(window_map, &self->lgripbottom, self->client);
-	g_hash_table_insert(window_map, &self->rgripright, self->client);
-	g_hash_table_insert(window_map, &self->rgriptop, self->client);
-	g_hash_table_insert(window_map, &self->rgripbottom, self->client);
+void frame_grab(gpointer _self, GHashTable * window_map)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    /* DO NOT map the client window here. we used to do that, but it is bogus.
+     we need to set up the client's dimensions and everything before we
+     send a mapnotify or we create race conditions.
+     */
+
+    /* reparent the client to the frame */
+    XReparentWindow(plugin.ob_display, self->client->window, self->window, 0, 0);
+
+    /*
+     When reparenting the client window, it is usually not mapped yet, since
+     this occurs from a MapRequest. However, in the case where Openbox is
+     starting up, the window is already mapped, so we'll see an unmap event
+     for it.
+     */
+    if (ob_state() == OB_STATE_STARTING)
+        ++self->client->ignore_unmaps;
+
+    /* select the event mask on the client's parent (to receive config/map
+     req's) the ButtonPress is to catch clicks on the client border */
+    XSelectInput(plugin.ob_display, self->window, FRAME_EVENTMASK);
+
+    /* set all the windows for the frame in the window_map */
+    g_hash_table_insert(window_map, &self->window, self->client);
+    g_hash_table_insert(window_map, &self->backback, self->client);
+    g_hash_table_insert(window_map, &self->backfront, self->client);
+    g_hash_table_insert(window_map, &self->innerleft, self->client);
+    g_hash_table_insert(window_map, &self->innertop, self->client);
+    g_hash_table_insert(window_map, &self->innerright, self->client);
+    g_hash_table_insert(window_map, &self->innerbottom, self->client);
+    g_hash_table_insert(window_map, &self->title, self->client);
+    g_hash_table_insert(window_map, &self->label, self->client);
+    g_hash_table_insert(window_map, &self->max, self->client);
+    g_hash_table_insert(window_map, &self->close, self->client);
+    g_hash_table_insert(window_map, &self->desk, self->client);
+    g_hash_table_insert(window_map, &self->shade, self->client);
+    g_hash_table_insert(window_map, &self->icon, self->client);
+    g_hash_table_insert(window_map, &self->iconify, self->client);
+    g_hash_table_insert(window_map, &self->handle, self->client);
+    g_hash_table_insert(window_map, &self->lgrip, self->client);
+    g_hash_table_insert(window_map, &self->rgrip, self->client);
+    g_hash_table_insert(window_map, &self->topresize, self->client);
+    g_hash_table_insert(window_map, &self->tltresize, self->client);
+    g_hash_table_insert(window_map, &self->tllresize, self->client);
+    g_hash_table_insert(window_map, &self->trtresize, self->client);
+    g_hash_table_insert(window_map, &self->trrresize, self->client);
+    g_hash_table_insert(window_map, &self->left, self->client);
+    g_hash_table_insert(window_map, &self->right, self->client);
+    g_hash_table_insert(window_map, &self->titleleft, self->client);
+    g_hash_table_insert(window_map, &self->titletop, self->client);
+    g_hash_table_insert(window_map, &self->titletopleft, self->client);
+    g_hash_table_insert(window_map, &self->titletopright, self->client);
+    g_hash_table_insert(window_map, &self->titleright, self->client);
+    g_hash_table_insert(window_map, &self->titlebottom, self->client);
+    g_hash_table_insert(window_map, &self->handleleft, self->client);
+    g_hash_table_insert(window_map, &self->handletop, self->client);
+    g_hash_table_insert(window_map, &self->handleright, self->client);
+    g_hash_table_insert(window_map, &self->handlebottom, self->client);
+    g_hash_table_insert(window_map, &self->lgripleft, self->client);
+    g_hash_table_insert(window_map, &self->lgriptop, self->client);
+    g_hash_table_insert(window_map, &self->lgripbottom, self->client);
+    g_hash_table_insert(window_map, &self->rgripright, self->client);
+    g_hash_table_insert(window_map, &self->rgriptop, self->client);
+    g_hash_table_insert(window_map, &self->rgripbottom, self->client);
 }
 
-void frame_ungrab(gpointer _self, GHashTable * window_map) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	XEvent ev;
-	gboolean reparent = TRUE;
-
-	/* if there was any animation going on, kill it */
-	obt_main_loop_timeout_remove_data(plugin.ob_main_loop,
-			frame_animate_iconify, self, FALSE);
-
-	/* check if the app has already reparented its window away */
-	while (XCheckTypedWindowEvent(plugin.ob_display, self->client->window,
-			ReparentNotify, &ev)) {
-		/* This check makes sure we don't catch our own reparent action to
-		 our frame window. This doesn't count as the app reparenting itself
-		 away of course.
-
-		 Reparent events that are generated by us are just discarded here.
-		 They are of no consequence to us anyhow.
-		 */
-		if (ev.xreparent.parent != self->window) {
-			reparent = FALSE;
-			XPutBackEvent(plugin.ob_display, &ev);
-			break;
-		}
-	}
-
-	if (reparent) {
-		/* according to the ICCCM - if the client doesn't reparent itself,
-		 then we will reparent the window to root for them */
-		XReparentWindow(plugin.ob_display, self->client->window, RootWindow(
-				plugin.ob_display, plugin.ob_screen), self->client_area.x,
-				self->client_area.y);
-	}
-
-	/* remove all the windows for the frame from the window_map */
-	g_hash_table_remove(window_map, &self->window);
-	g_hash_table_remove(window_map, &self->backback);
-	g_hash_table_remove(window_map, &self->backfront);
-	g_hash_table_remove(window_map, &self->innerleft);
-	g_hash_table_remove(window_map, &self->innertop);
-	g_hash_table_remove(window_map, &self->innerright);
-	g_hash_table_remove(window_map, &self->innerbottom);
-	g_hash_table_remove(window_map, &self->title);
-	g_hash_table_remove(window_map, &self->label);
-	g_hash_table_remove(window_map, &self->max);
-	g_hash_table_remove(window_map, &self->close);
-	g_hash_table_remove(window_map, &self->desk);
-	g_hash_table_remove(window_map, &self->shade);
-	g_hash_table_remove(window_map, &self->icon);
-	g_hash_table_remove(window_map, &self->iconify);
-	g_hash_table_remove(window_map, &self->handle);
-	g_hash_table_remove(window_map, &self->lgrip);
-	g_hash_table_remove(window_map, &self->rgrip);
-	g_hash_table_remove(window_map, &self->topresize);
-	g_hash_table_remove(window_map, &self->tltresize);
-	g_hash_table_remove(window_map, &self->tllresize);
-	g_hash_table_remove(window_map, &self->trtresize);
-	g_hash_table_remove(window_map, &self->trrresize);
-	g_hash_table_remove(window_map, &self->left);
-	g_hash_table_remove(window_map, &self->right);
-	g_hash_table_remove(window_map, &self->titleleft);
-	g_hash_table_remove(window_map, &self->titletop);
-	g_hash_table_remove(window_map, &self->titletopleft);
-	g_hash_table_remove(window_map, &self->titletopright);
-	g_hash_table_remove(window_map, &self->titleright);
-	g_hash_table_remove(window_map, &self->titlebottom);
-	g_hash_table_remove(window_map, &self->handleleft);
-	g_hash_table_remove(window_map, &self->handletop);
-	g_hash_table_remove(window_map, &self->handleright);
-	g_hash_table_remove(window_map, &self->handlebottom);
-	g_hash_table_remove(window_map, &self->lgripleft);
-	g_hash_table_remove(window_map, &self->lgriptop);
-	g_hash_table_remove(window_map, &self->lgripbottom);
-	g_hash_table_remove(window_map, &self->rgripright);
-	g_hash_table_remove(window_map, &self->rgriptop);
-	g_hash_table_remove(window_map, &self->rgripbottom);
-
-	obt_main_loop_timeout_remove_data(plugin.ob_main_loop, flash_timeout, self,
-			TRUE);
+void frame_ungrab(gpointer _self, GHashTable * window_map)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    XEvent ev;
+    gboolean reparent = TRUE;
+
+    /* if there was any animation going on, kill it */
+    obt_main_loop_timeout_remove_data(plugin.ob_main_loop,
+            frame_animate_iconify, self, FALSE);
+
+    /* check if the app has already reparented its window away */
+    while (XCheckTypedWindowEvent(plugin.ob_display, self->client->window,
+            ReparentNotify, &ev)) {
+        /* This check makes sure we don't catch our own reparent action to
+         our frame window. This doesn't count as the app reparenting itself
+         away of course.
+
+         Reparent events that are generated by us are just discarded here.
+         They are of no consequence to us anyhow.
+         */
+        if (ev.xreparent.parent != self->window) {
+            reparent = FALSE;
+            XPutBackEvent(plugin.ob_display, &ev);
+            break;
+        }
+    }
+
+    if (reparent) {
+        /* according to the ICCCM - if the client doesn't reparent itself,
+         then we will reparent the window to root for them */
+        XReparentWindow(plugin.ob_display, self->client->window, RootWindow(
+                plugin.ob_display, plugin.ob_screen), self->client_area.x,
+                self->client_area.y);
+    }
+
+    /* remove all the windows for the frame from the window_map */
+    g_hash_table_remove(window_map, &self->window);
+    g_hash_table_remove(window_map, &self->backback);
+    g_hash_table_remove(window_map, &self->backfront);
+    g_hash_table_remove(window_map, &self->innerleft);
+    g_hash_table_remove(window_map, &self->innertop);
+    g_hash_table_remove(window_map, &self->innerright);
+    g_hash_table_remove(window_map, &self->innerbottom);
+    g_hash_table_remove(window_map, &self->title);
+    g_hash_table_remove(window_map, &self->label);
+    g_hash_table_remove(window_map, &self->max);
+    g_hash_table_remove(window_map, &self->close);
+    g_hash_table_remove(window_map, &self->desk);
+    g_hash_table_remove(window_map, &self->shade);
+    g_hash_table_remove(window_map, &self->icon);
+    g_hash_table_remove(window_map, &self->iconify);
+    g_hash_table_remove(window_map, &self->handle);
+    g_hash_table_remove(window_map, &self->lgrip);
+    g_hash_table_remove(window_map, &self->rgrip);
+    g_hash_table_remove(window_map, &self->topresize);
+    g_hash_table_remove(window_map, &self->tltresize);
+    g_hash_table_remove(window_map, &self->tllresize);
+    g_hash_table_remove(window_map, &self->trtresize);
+    g_hash_table_remove(window_map, &self->trrresize);
+    g_hash_table_remove(window_map, &self->left);
+    g_hash_table_remove(window_map, &self->right);
+    g_hash_table_remove(window_map, &self->titleleft);
+    g_hash_table_remove(window_map, &self->titletop);
+    g_hash_table_remove(window_map, &self->titletopleft);
+    g_hash_table_remove(window_map, &self->titletopright);
+    g_hash_table_remove(window_map, &self->titleright);
+    g_hash_table_remove(window_map, &self->titlebottom);
+    g_hash_table_remove(window_map, &self->handleleft);
+    g_hash_table_remove(window_map, &self->handletop);
+    g_hash_table_remove(window_map, &self->handleright);
+    g_hash_table_remove(window_map, &self->handlebottom);
+    g_hash_table_remove(window_map, &self->lgripleft);
+    g_hash_table_remove(window_map, &self->lgriptop);
+    g_hash_table_remove(window_map, &self->lgripbottom);
+    g_hash_table_remove(window_map, &self->rgripright);
+    g_hash_table_remove(window_map, &self->rgriptop);
+    g_hash_table_remove(window_map, &self->rgripbottom);
+
+    obt_main_loop_timeout_remove_data(plugin.ob_main_loop, flash_timeout, self,
+            TRUE);
 }
 
-ObFrameContext frame_context(gpointer _self, Window win, gint x, gint y) {
-	ObDefaultFrame * self = OBDEFAULTFRAME(_self);
-
-	/* when the user clicks in the corners of the titlebar and the client
-	 is fully maximized, then treat it like they clicked in the
-	 button that is there */
-	if (self->max_horz && self->max_vert && (win == self->title || win
-			== self->titletop || win == self->titleleft || win
-			== self->titletopleft || win == self->titleright || win
-			== self->titletopright)) {
-		/* get the mouse coords in reference to the whole frame */
-		gint fx = x;
-		gint fy = y;
-
-		/* these windows are down a border width from the top of the frame */
-		if (win == self->title || win == self->titleleft || win
-				== self->titleright)
-			fy += self->bwidth;
-
-		/* title is a border width in from the edge */
-		if (win == self->title)
-			fx += self->bwidth;
-		/* titletop is a bit to the right */
-		else if (win == self->titletop)
-			fx += theme_config.grip_width + self->bwidth;
-		/* titletopright is way to the right edge */
-		else if (win == self->titletopright)
-			fx += self->area.width - (theme_config.grip_width + self->bwidth);
-		/* titleright is even more way to the right edge */
-		else if (win == self->titleright)
-			fx += self->area.width - self->bwidth;
-
-		/* figure out if we're over the area that should be considered a
-		 button */
-		if (fy < self->bwidth + theme_config.paddingy + 1
-				+ theme_config.button_size) {
-			if (fx < (self->bwidth + theme_config.paddingx + 1
-					+ theme_config.button_size)) {
-				if (self->leftmost != OB_FRAME_CONTEXT_NONE)
-					return self->leftmost;
-			} else if (fx >= (self->area.width - (self->bwidth
-					+ theme_config.paddingx + 1 + theme_config.button_size))) {
-				if (self->rightmost != OB_FRAME_CONTEXT_NONE)
-					return self->rightmost;
-			}
-		}
-
-		/* there is no resizing maximized windows so make them the titlebar
-		 context */
-		return OB_FRAME_CONTEXT_TITLEBAR;
-	} else if (self->max_vert && (win == self->titletop || win
-			== self->topresize))
-		/* can't resize vertically when max vert */
-		return OB_FRAME_CONTEXT_TITLEBAR;
-	else if (self->shaded && (win == self->titletop || win == self->topresize))
-		/* can't resize vertically when shaded */
-		return OB_FRAME_CONTEXT_TITLEBAR;
-
-	if (win == self->window)
-		return OB_FRAME_CONTEXT_FRAME;
-	if (win == self->label)
-		return OB_FRAME_CONTEXT_TITLEBAR;
-	if (win == self->handle)
-		return OB_FRAME_CONTEXT_BOTTOM;
-	if (win == self->handletop)
-		return OB_FRAME_CONTEXT_BOTTOM;
-	if (win == self->handlebottom)
-		return OB_FRAME_CONTEXT_BOTTOM;
-	if (win == self->handleleft)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->lgrip)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->lgripleft)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->lgriptop)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->lgripbottom)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->handleright)
-		return OB_FRAME_CONTEXT_BRCORNER;
-	if (win == self->rgrip)
-		return OB_FRAME_CONTEXT_BRCORNER;
-	if (win == self->rgripright)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->rgriptop)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->rgripbottom)
-		return OB_FRAME_CONTEXT_BLCORNER;
-	if (win == self->title)
-		return OB_FRAME_CONTEXT_TITLEBAR;
-	if (win == self->titlebottom)
-		return OB_FRAME_CONTEXT_TITLEBAR;
-	if (win == self->titleleft)
-		return OB_FRAME_CONTEXT_TLCORNER;
-	if (win == self->titletopleft)
-		return OB_FRAME_CONTEXT_TLCORNER;
-	if (win == self->titleright)
-		return OB_FRAME_CONTEXT_TRCORNER;
-	if (win == self->titletopright)
-		return OB_FRAME_CONTEXT_TRCORNER;
-	if (win == self->titletop)
-		return OB_FRAME_CONTEXT_TOP;
-	if (win == self->topresize)
-		return OB_FRAME_CONTEXT_TOP;
-	if (win == self->tltresize)
-		return OB_FRAME_CONTEXT_TLCORNER;
-	if (win == self->tllresize)
-		return OB_FRAME_CONTEXT_TLCORNER;
-	if (win == self->trtresize)
-		return OB_FRAME_CONTEXT_TRCORNER;
-	if (win == self->trrresize)
-		return OB_FRAME_CONTEXT_TRCORNER;
-	if (win == self->left)
-		return OB_FRAME_CONTEXT_LEFT;
-	if (win == self->right)
-		return OB_FRAME_CONTEXT_RIGHT;
-	if (win == self->innertop)
-		return OB_FRAME_CONTEXT_TITLEBAR;
-	if (win == self->innerleft)
-		return OB_FRAME_CONTEXT_LEFT;
-	if (win == self->innerbottom)
-		return OB_FRAME_CONTEXT_BOTTOM;
-	if (win == self->innerright)
-		return OB_FRAME_CONTEXT_RIGHT;
-	if (win == self->max)
-		return OB_FRAME_CONTEXT_MAXIMIZE;
-	if (win == self->iconify)
-		return OB_FRAME_CONTEXT_ICONIFY;
-	if (win == self->close)
-		return OB_FRAME_CONTEXT_CLOSE;
-	if (win == self->icon)
-		return OB_FRAME_CONTEXT_ICON;
-	if (win == self->desk)
-		return OB_FRAME_CONTEXT_ALLDESKTOPS;
-	if (win == self->shade)
-		return OB_FRAME_CONTEXT_SHADE;
-
-	return OB_FRAME_CONTEXT_NONE;
+ObFrameContext frame_context(gpointer _self, Window win, gint x, gint y)
+{
+    ObDefaultFrame * self = OBDEFAULTFRAME(_self);
+
+    /* when the user clicks in the corners of the titlebar and the client
+     is fully maximized, then treat it like they clicked in the
+     button that is there */
+    if (self->max_horz && self->max_vert && (win == self->title || win
+            == self->titletop || win == self->titleleft || win
+            == self->titletopleft || win == self->titleright || win
+            == self->titletopright)) {
+        /* get the mouse coords in reference to the whole frame */
+        gint fx = x;
+        gint fy = y;
+
+        /* these windows are down a border width from the top of the frame */
+        if (win == self->title || win == self->titleleft || win
+                == self->titleright)
+            fy += self->bwidth;
+
+        /* title is a border width in from the edge */
+        if (win == self->title)
+            fx += self->bwidth;
+        /* titletop is a bit to the right */
+        else if (win == self->titletop)
+            fx += theme_config.grip_width + self->bwidth;
+        /* titletopright is way to the right edge */
+        else if (win == self->titletopright)
+            fx += self->area.width - (theme_config.grip_width + self->bwidth);
+        /* titleright is even more way to the right edge */
+        else if (win == self->titleright)
+            fx += self->area.width - self->bwidth;
+
+        /* figure out if we're over the area that should be considered a
+         button */
+        if (fy < self->bwidth + theme_config.paddingy + 1
+                + theme_config.button_size) {
+            if (fx < (self->bwidth + theme_config.paddingx + 1
+                    + theme_config.button_size)) {
+                if (self->leftmost != OB_FRAME_CONTEXT_NONE)
+                    return self->leftmost;
+            }
+            else if (fx >= (self->area.width - (self->bwidth
+                    + theme_config.paddingx + 1 + theme_config.button_size))) {
+                if (self->rightmost != OB_FRAME_CONTEXT_NONE)
+                    return self->rightmost;
+            }
+        }
+
+        /* there is no resizing maximized windows so make them the titlebar
+         context */
+        return OB_FRAME_CONTEXT_TITLEBAR;
+    }
+    else if (self->max_vert
+            && (win == self->titletop || win == self->topresize))
+        /* can't resize vertically when max vert */
+        return OB_FRAME_CONTEXT_TITLEBAR;
+    else if (self->shaded && (win == self->titletop || win == self->topresize))
+        /* can't resize vertically when shaded */
+        return OB_FRAME_CONTEXT_TITLEBAR;
+
+    if (win == self->window)
+        return OB_FRAME_CONTEXT_FRAME;
+    if (win == self->label)
+        return OB_FRAME_CONTEXT_TITLEBAR;
+    if (win == self->handle)
+        return OB_FRAME_CONTEXT_BOTTOM;
+    if (win == self->handletop)
+        return OB_FRAME_CONTEXT_BOTTOM;
+    if (win == self->handlebottom)
+        return OB_FRAME_CONTEXT_BOTTOM;
+    if (win == self->handleleft)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->lgrip)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->lgripleft)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->lgriptop)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->lgripbottom)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->handleright)
+        return OB_FRAME_CONTEXT_BRCORNER;
+    if (win == self->rgrip)
+        return OB_FRAME_CONTEXT_BRCORNER;
+    if (win == self->rgripright)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->rgriptop)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->rgripbottom)
+        return OB_FRAME_CONTEXT_BLCORNER;
+    if (win == self->title)
+        return OB_FRAME_CONTEXT_TITLEBAR;
+    if (win == self->titlebottom)
+        return OB_FRAME_CONTEXT_TITLEBAR;
+    if (win == self->titleleft)
+        return OB_FRAME_CONTEXT_TLCORNER;
+    if (win == self->titletopleft)
+        return OB_FRAME_CONTEXT_TLCORNER;
+    if (win == self->titleright)
+        return OB_FRAME_CONTEXT_TRCORNER;
+    if (win == self->titletopright)
+        return OB_FRAME_CONTEXT_TRCORNER;
+    if (win == self->titletop)
+        return OB_FRAME_CONTEXT_TOP;
+    if (win == self->topresize)
+        return OB_FRAME_CONTEXT_TOP;
+    if (win == self->tltresize)
+        return OB_FRAME_CONTEXT_TLCORNER;
+    if (win == self->tllresize)
+        return OB_FRAME_CONTEXT_TLCORNER;
+    if (win == self->trtresize)
+        return OB_FRAME_CONTEXT_TRCORNER;
+    if (win == self->trrresize)
+        return OB_FRAME_CONTEXT_TRCORNER;
+    if (win == self->left)
+        return OB_FRAME_CONTEXT_LEFT;
+    if (win == self->right)
+        return OB_FRAME_CONTEXT_RIGHT;
+    if (win == self->innertop)
+        return OB_FRAME_CONTEXT_TITLEBAR;
+    if (win == self->innerleft)
+        return OB_FRAME_CONTEXT_LEFT;
+    if (win == self->innerbottom)
+        return OB_FRAME_CONTEXT_BOTTOM;
+    if (win == self->innerright)
+        return OB_FRAME_CONTEXT_RIGHT;
+    if (win == self->max)
+        return OB_FRAME_CONTEXT_MAXIMIZE;
+    if (win == self->iconify)
+        return OB_FRAME_CONTEXT_ICONIFY;
+    if (win == self->close)
+        return OB_FRAME_CONTEXT_CLOSE;
+    if (win == self->icon)
+        return OB_FRAME_CONTEXT_ICON;
+    if (win == self->desk)
+        return OB_FRAME_CONTEXT_ALLDESKTOPS;
+    if (win == self->shade)
+        return OB_FRAME_CONTEXT_SHADE;
+
+    return OB_FRAME_CONTEXT_NONE;
 }
 
-void frame_set_is_visible(gpointer self, gboolean b) {
-	OBDEFAULTFRAME(self)->visible = b;
+void frame_set_is_visible(gpointer self, gboolean b)
+{
+    OBDEFAULTFRAME(self)->visible = b;
 }
 
-void frame_set_is_focus(gpointer self, gboolean b) {
-	OBDEFAULTFRAME(self)->focused = b;
+void frame_set_is_focus(gpointer self, gboolean b)
+{
+    OBDEFAULTFRAME(self)->focused = b;
 }
 
-void frame_set_is_max_vert(gpointer self, gboolean b) {
-	OBDEFAULTFRAME(self)->max_vert = b;
+void frame_set_is_max_vert(gpointer self, gboolean b)
+{
+    OBDEFAULTFRAME(self)->max_vert = b;
 }
 
-void frame_set_is_max_horz(gpointer self, gboolean b) {
-	OBDEFAULTFRAME(self)->max_horz = b;
+void frame_set_is_max_horz(gpointer self, gboolean b)
+{
+    OBDEFAULTFRAME(self)->max_horz = b;
 }
 
-void frame_set_is_shaded(gpointer self, gboolean b) {
-	OBDEFAULTFRAME(self)->shaded = b;
+void frame_set_is_shaded(gpointer self, gboolean b)
+{
+    OBDEFAULTFRAME(self)->shaded = b;
 }
 
-void frame_unfocus(gpointer self) {
-	OBDEFAULTFRAME(self)->focused = FALSE;
+void frame_unfocus(gpointer self)
+{
+    OBDEFAULTFRAME(self)->focused = FALSE;
 }
 
-void frame_flash_start(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	self->flash_on = self->focused;
+void frame_flash_start(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    self->flash_on = self->focused;
 
-	if (!self->flashing)
-		obt_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
-				flash_timeout, self, g_direct_equal, flash_done);
-	g_get_current_time(&self->flash_end);
-	g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
+    if (!self->flashing)
+        obt_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
+                flash_timeout, self, g_direct_equal, flash_done);
+    g_get_current_time(&self->flash_end);
+    g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
 
-	self->flashing = TRUE;
+    self->flashing = TRUE;
 }
 
-void frame_flash_stop(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	self->flashing = FALSE;
+void frame_flash_stop(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    self->flashing = FALSE;
 }
 
-void frame_begin_iconify_animation(gpointer _self, gboolean iconifying) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	gulong time;
-	gboolean new_anim = FALSE;
-	gboolean set_end = TRUE;
-	GTimeVal now;
-
-	/* if there is no titlebar, just don't animate for now
-	 XXX it would be nice tho.. */
-	if (!(self->decorations & OB_FRAME_DECOR_TITLEBAR))
-		return;
-
-	/* get the current time */
-	g_get_current_time(&now);
-
-	/* get how long until the end */
-	time = FRAME_ANIMATE_ICONIFY_TIME;
-	if (self->iconify_animation_going) {
-		if (!!iconifying != (self->iconify_animation_going > 0)) {
-			/* animation was already going on in the opposite direction */
-			time = time - frame_animate_iconify_time_left(_self, &now);
-		} else
-			/* animation was already going in the same direction */
-			set_end = FALSE;
-	} else
-		new_anim = TRUE;
-	self->iconify_animation_going = iconifying ? 1 : -1;
-
-	/* set the ending time */
-	if (set_end) {
-		self->iconify_animation_end.tv_sec = now.tv_sec;
-		self->iconify_animation_end.tv_usec = now.tv_usec;
-		g_time_val_add(&self->iconify_animation_end, time);
-	}
-
-	if (new_anim) {
-		obt_main_loop_timeout_remove_data(plugin.ob_main_loop,
-				frame_animate_iconify, self, FALSE);
-		obt_main_loop_timeout_add(plugin.ob_main_loop,
-		FRAME_ANIMATE_ICONIFY_STEP_TIME, frame_animate_iconify, self,
-				g_direct_equal, NULL);
-
-		/* do the first step */
-		frame_animate_iconify(self);
-
-		/* show it during the animation even if it is not "visible" */
-		if (!self->visible)
-			XMapWindow(plugin.ob_display, self->window);
-	}
+void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    gulong time;
+    gboolean new_anim = FALSE;
+    gboolean set_end = TRUE;
+    GTimeVal now;
+
+    /* if there is no titlebar, just don't animate for now
+     XXX it would be nice tho.. */
+    if (!(self->decorations & OB_FRAME_DECOR_TITLEBAR))
+        return;
+
+    /* get the current time */
+    g_get_current_time(&now);
+
+    /* get how long until the end */
+    time = FRAME_ANIMATE_ICONIFY_TIME;
+    if (self->iconify_animation_going) {
+        if (!!iconifying != (self->iconify_animation_going > 0)) {
+            /* animation was already going on in the opposite direction */
+            time = time - frame_animate_iconify_time_left(_self, &now);
+        }
+        else
+            /* animation was already going in the same direction */
+            set_end = FALSE;
+    }
+    else
+        new_anim = TRUE;
+    self->iconify_animation_going = iconifying ? 1 : -1;
+
+    /* set the ending time */
+    if (set_end) {
+        self->iconify_animation_end.tv_sec = now.tv_sec;
+        self->iconify_animation_end.tv_usec = now.tv_usec;
+        g_time_val_add(&self->iconify_animation_end, time);
+    }
+
+    if (new_anim) {
+        obt_main_loop_timeout_remove_data(plugin.ob_main_loop,
+                frame_animate_iconify, self, FALSE);
+        obt_main_loop_timeout_add(plugin.ob_main_loop, 
+        FRAME_ANIMATE_ICONIFY_STEP_TIME, frame_animate_iconify, self,
+                g_direct_equal, NULL);
+
+        /* do the first step */
+        frame_animate_iconify(self);
+
+        /* show it during the animation even if it is not "visible" */
+        if (!self->visible)
+            XMapWindow(plugin.ob_display, self->window);
+    }
 }
 
-void frame_end_iconify_animation(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	/* see if there is an animation going */
-	if (self->iconify_animation_going == 0)
-		return;
-
-	if (!self->visible)
-		XUnmapWindow(plugin.ob_display, self->window);
-	else {
-		/* Send a ConfigureNotify when the animation is done, this fixes
-		 KDE's pager showing the window in the wrong place.  since the
-		 window is mapped at a different location and is then moved, we
-		 need to send the synthetic configurenotify, since apps may have
-		 read the position when the client mapped, apparently. */
-		client_reconfigure(self->client, TRUE);
-	}
-
-	/* we're not animating any more ! */
-	self->iconify_animation_going = 0;
-
-	XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-			self->area.y, self->area.width, self->area.height);
-	/* we delay re-rendering until after we're done animating */
-	frame_update_skin(self);
-	XFlush(plugin.ob_display);
+void frame_end_iconify_animation(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    /* see if there is an animation going */
+    if (self->iconify_animation_going == 0)
+        return;
+
+    if (!self->visible)
+        XUnmapWindow(plugin.ob_display, self->window);
+    else {
+        /* Send a ConfigureNotify when the animation is done, this fixes
+         KDE's pager showing the window in the wrong place.  since the
+         window is mapped at a different location and is then moved, we
+         need to send the synthetic configurenotify, since apps may have
+         read the position when the client mapped, apparently. */
+        client_reconfigure(self->client, TRUE);
+    }
+
+    /* we're not animating any more ! */
+    self->iconify_animation_going = 0;
+
+    XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
+            self->area.y, self->area.width, self->area.height);
+    /* we delay re-rendering until after we're done animating */
+    frame_update_skin(self);
+    XFlush(plugin.ob_display);
 }
 
-gboolean frame_iconify_animating(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	return self->iconify_animation_going != 0;
+gboolean frame_iconify_animating(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    return self->iconify_animation_going != 0;
 }
 
-void frame_set_decorations(gpointer self, ObFrameDecorations d) {
-	OBDEFAULTFRAME(self)->decorations = d;
+void frame_set_decorations(gpointer self, ObFrameDecorations d)
+{
+    OBDEFAULTFRAME(self)->decorations = d;
 }
 
-Rect frame_get_window_area(gpointer self) {
-	return OBDEFAULTFRAME(self)->area;
+Rect frame_get_window_area(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->area;
 }
-void frame_set_client_area(gpointer self, Rect r) {
-	OBDEFAULTFRAME(self)->client_area = r;
+void frame_set_client_area(gpointer self, Rect r)
+{
+    OBDEFAULTFRAME(self)->client_area = r;
 }
 
-void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	Strut oldsize;
-
-	oldsize = self->size;
-	self->area = self->client_area;
-
-	/* do this before changing the frame's status like max_horz max_vert */
-	frame_adjust_cursors(self);
-
-	if (self->decorations & OB_FRAME_DECOR_BORDER || (plugin.config_theme_keepborder)) {
-		self->bwidth = theme_config.fbwidth;
-	} else {
-		self->bwidth = 0;
-	}
-
-	if (self->decorations & OB_FRAME_DECOR_BORDER) {
-		self->cbwidth_l = theme_config.cbwidthx;
-		self->cbwidth_r = theme_config.cbwidthx;
-		self->cbwidth_t = theme_config.cbwidthy;
-		self->cbwidth_b = theme_config.cbwidthy;
-	} else {
-		self->cbwidth_l = 0;
-		self->cbwidth_t = 0;
-		self->cbwidth_r = 0;
-		self->cbwidth_b = 0;
-	}
-
-	if (self->max_horz) {
-		self->cbwidth_l = 0;
-		self->cbwidth_r = 0;
-		self->width = self->client_area.width;
-		if (self->max_vert)
-			self->cbwidth_b = 0;
-	} else {
-		self->width = self->client_area.width + self->cbwidth_l
-				+ self->cbwidth_r;
-	}
-
-	/* some elements are sized based of the width, so don't let them have
-	 negative values */
-	self->width = MAX(self->width, (theme_config.grip_width + self->bwidth) * 2
-			+ 1);
-
-	STRUT_SET(self->size, self->cbwidth_l
-			+ (!self->max_horz ? self->bwidth : 0), self->cbwidth_t
-			+ self->bwidth, self->cbwidth_r + (!self->max_horz ? self->bwidth
-			: 0), self->cbwidth_b
-			+ (!self->max_horz || !self->max_vert ? self->bwidth : 0));
-
-	if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-		self->size.top += theme_config.title_height + self->bwidth;
-	if (self->decorations & OB_FRAME_DECOR_HANDLE && theme_config.handle_height
-			> 0) {
-		self->size.bottom += theme_config.handle_height + self->bwidth;
-	}
-
-	/* position/size and map/unmap all the windows */
-	if (!is_fake) {
-		gint innercornerheight = theme_config.grip_width - self->size.bottom;
-
-		if (self->cbwidth_l) {
-			XMoveResizeWindow(plugin.ob_display, self->innerleft,
-					self->size.left - self->cbwidth_l, self->size.top,
-					self->cbwidth_l, self->client_area.height);
-
-			XMapWindow(plugin.ob_display, self->innerleft);
-		} else
-			XUnmapWindow(plugin.ob_display, self->innerleft);
-
-		if (self->cbwidth_l && innercornerheight > 0) {
-			XMoveResizeWindow(plugin.ob_display, self->innerbll, 0,
-					self->client_area.height - (theme_config.grip_width
-							- self->size.bottom), self->cbwidth_l,
-					theme_config.grip_width - self->size.bottom);
-
-			XMapWindow(plugin.ob_display, self->innerbll);
-		} else
-			XUnmapWindow(plugin.ob_display, self->innerbll);
-
-		if (self->cbwidth_r) {
-			XMoveResizeWindow(plugin.ob_display, self->innerright,
-					self->size.left + self->client_area.width, self->size.top,
-					self->cbwidth_r, self->client_area.height);
-
-			XMapWindow(plugin.ob_display, self->innerright);
-		} else
-			XUnmapWindow(plugin.ob_display, self->innerright);
-
-		if (self->cbwidth_r && innercornerheight > 0) {
-			XMoveResizeWindow(plugin.ob_display, self->innerbrr, 0,
-					self->client_area.height - (theme_config.grip_width
-							- self->size.bottom), self->cbwidth_r,
-					theme_config.grip_width - self->size.bottom);
-
-			XMapWindow(plugin.ob_display, self->innerbrr);
-		} else
-			XUnmapWindow(plugin.ob_display, self->innerbrr);
-
-		if (self->cbwidth_t) {
-			XMoveResizeWindow(plugin.ob_display, self->innertop,
-					self->size.left - self->cbwidth_l, self->size.top
-							- self->cbwidth_t, self->client_area.width
-							+ self->cbwidth_l + self->cbwidth_r,
-					self->cbwidth_t);
-
-			XMapWindow(plugin.ob_display, self->innertop);
-		} else
-			XUnmapWindow(plugin.ob_display, self->innertop);
-
-		if (self->cbwidth_b) {
-			XMoveResizeWindow(plugin.ob_display, self->innerbottom,
-					self->size.left - self->cbwidth_l, self->size.top
-							+ self->client_area.height, self->client_area.width
-							+ self->cbwidth_l + self->cbwidth_r,
-					self->cbwidth_b);
-
-			XMoveResizeWindow(plugin.ob_display, self->innerblb, 0, 0,
-					theme_config.grip_width + self->bwidth, self->cbwidth_b);
-			XMoveResizeWindow(plugin.ob_display, self->innerbrb,
-					self->client_area.width + self->cbwidth_l + self->cbwidth_r
-							- (theme_config.grip_width + self->bwidth), 0,
-					theme_config.grip_width + self->bwidth, self->cbwidth_b);
-
-			XMapWindow(plugin.ob_display, self->innerbottom);
-			XMapWindow(plugin.ob_display, self->innerblb);
-			XMapWindow(plugin.ob_display, self->innerbrb);
-		} else {
-			XUnmapWindow(plugin.ob_display, self->innerbottom);
-			XUnmapWindow(plugin.ob_display, self->innerblb);
-			XUnmapWindow(plugin.ob_display, self->innerbrb);
-		}
-
-		if (self->bwidth) {
-			gint titlesides;
-
-			/* height of titleleft and titleright */
-			titlesides = (!self->max_horz ? theme_config.grip_width : 0);
-
-			XMoveResizeWindow(plugin.ob_display, self->titletop,
-					theme_config.grip_width + self->bwidth, 0,
-					/* width + bwidth*2 - bwidth*2 - grips*2 */
-					self->width - theme_config.grip_width * 2, self->bwidth);
-			XMoveResizeWindow(plugin.ob_display, self->titletopleft, 0, 0,
-					theme_config.grip_width + self->bwidth, self->bwidth);
-			XMoveResizeWindow(plugin.ob_display, self->titletopright,
-					self->client_area.width + self->size.left
-							+ self->size.right - theme_config.grip_width
-							- self->bwidth, 0, theme_config.grip_width
-							+ self->bwidth, self->bwidth);
-
-			if (titlesides > 0) {
-				XMoveResizeWindow(plugin.ob_display, self->titleleft, 0,
-						self->bwidth, self->bwidth, titlesides);
-				XMoveResizeWindow(plugin.ob_display, self->titleright,
-						self->client_area.width + self->size.left
-								+ self->size.right - self->bwidth,
-						self->bwidth, self->bwidth, titlesides);
-
-				XMapWindow(plugin.ob_display, self->titleleft);
-				XMapWindow(plugin.ob_display, self->titleright);
-			} else {
-				XUnmapWindow(plugin.ob_display, self->titleleft);
-				XUnmapWindow(plugin.ob_display, self->titleright);
-			}
-
-			XMapWindow(plugin.ob_display, self->titletop);
-			XMapWindow(plugin.ob_display, self->titletopleft);
-			XMapWindow(plugin.ob_display, self->titletopright);
-
-			if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
-				XMoveResizeWindow(plugin.ob_display, self->titlebottom,
-						(self->max_horz ? 0 : self->bwidth),
-						theme_config.title_height + self->bwidth, self->width,
-						self->bwidth);
-
-				XMapWindow(plugin.ob_display, self->titlebottom);
-			} else
-				XUnmapWindow(plugin.ob_display, self->titlebottom);
-		} else {
-			XUnmapWindow(plugin.ob_display, self->titlebottom);
-
-			XUnmapWindow(plugin.ob_display, self->titletop);
-			XUnmapWindow(plugin.ob_display, self->titletopleft);
-			XUnmapWindow(plugin.ob_display, self->titletopright);
-			XUnmapWindow(plugin.ob_display, self->titleleft);
-			XUnmapWindow(plugin.ob_display, self->titleright);
-		}
-
-		if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
-			XMoveResizeWindow(plugin.ob_display, self->title,
-					(self->max_horz ? 0 : self->bwidth), self->bwidth,
-					self->width, theme_config.title_height);
-
-			XMapWindow(plugin.ob_display, self->title);
-
-			if (self->decorations & OB_FRAME_DECOR_GRIPS) {
-				XMoveResizeWindow(plugin.ob_display, self->topresize,
-						theme_config.grip_width, 0, self->width
-								- theme_config.grip_width *2,
-						theme_config.paddingy + 1);
-
-				XMoveWindow(plugin.ob_display, self->tltresize, 0, 0);
-				XMoveWindow(plugin.ob_display, self->tllresize, 0, 0);
-				XMoveWindow(plugin.ob_display, self->trtresize, self->width
-						- theme_config.grip_width, 0);
-				XMoveWindow(plugin.ob_display, self->trrresize, self->width
-						- theme_config.paddingx - 1, 0);
-
-				XMapWindow(plugin.ob_display, self->topresize);
-				XMapWindow(plugin.ob_display, self->tltresize);
-				XMapWindow(plugin.ob_display, self->tllresize);
-				XMapWindow(plugin.ob_display, self->trtresize);
-				XMapWindow(plugin.ob_display, self->trrresize);
-			} else {
-				XUnmapWindow(plugin.ob_display, self->topresize);
-				XUnmapWindow(plugin.ob_display, self->tltresize);
-				XUnmapWindow(plugin.ob_display, self->tllresize);
-				XUnmapWindow(plugin.ob_display, self->trtresize);
-				XUnmapWindow(plugin.ob_display, self->trrresize);
-			}
-		} else
-			XUnmapWindow(plugin.ob_display, self->title);
-	}
-
-	if ((self->decorations & OB_FRAME_DECOR_TITLEBAR))
-		/* layout the title bar elements */
-		layout_title(self);
-
-	if (!is_fake) {
-		gint sidebwidth = self->max_horz ? 0 : self->bwidth;
-
-		if (self->bwidth && self->size.bottom) {
-			XMoveResizeWindow(plugin.ob_display, self->handlebottom,
-					theme_config.grip_width + self->bwidth + sidebwidth,
-					self->size.top + self->client_area.height
-							+ self->size.bottom - self->bwidth, self->width
-							- (theme_config.grip_width + sidebwidth) * 2,
-					self->bwidth);
-
-			if (sidebwidth) {
-				XMoveResizeWindow(plugin.ob_display, self->lgripleft, 0,
-						self->size.top + self->client_area.height
-								+ self->size.bottom
-								- (!self->max_horz ? theme_config.grip_width
-										: self->size.bottom - self->cbwidth_b),
-						self->bwidth,
-						(!self->max_horz ? theme_config.grip_width
-								: self->size.bottom - self->cbwidth_b));
-				XMoveResizeWindow(plugin.ob_display, self->rgripright,
-						self->size.left + self->client_area.width
-								+ self->size.right - self->bwidth,
-						self->size.top + self->client_area.height
-								+ self->size.bottom
-								- (!self->max_horz ? theme_config.grip_width
-										: self->size.bottom - self->cbwidth_b),
-						self->bwidth,
-						(!self->max_horz ? theme_config.grip_width
-								: self->size.bottom - self->cbwidth_b));
-
-				XMapWindow(plugin.ob_display, self->lgripleft);
-				XMapWindow(plugin.ob_display, self->rgripright);
-			} else {
-				XUnmapWindow(plugin.ob_display, self->lgripleft);
-				XUnmapWindow(plugin.ob_display, self->rgripright);
-			}
-
-			XMoveResizeWindow(plugin.ob_display, self->lgripbottom, sidebwidth,
-					self->size.top + self->client_area.height
-							+ self->size.bottom - self->bwidth,
-					theme_config.grip_width + self->bwidth, self->bwidth);
-			XMoveResizeWindow(plugin.ob_display, self->rgripbottom,
-					self->size.left + self->client_area.width
-							+ self->size.right - self->bwidth - sidebwidth
-							- theme_config.grip_width, self->size.top
-							+ self->client_area.height + self->size.bottom
-							- self->bwidth, theme_config.grip_width
-							+ self->bwidth, self->bwidth);
-
-			XMapWindow(plugin.ob_display, self->handlebottom);
-			XMapWindow(plugin.ob_display, self->lgripbottom);
-			XMapWindow(plugin.ob_display, self->rgripbottom);
-
-			if (self->decorations & OB_FRAME_DECOR_HANDLE
-					&& theme_config.handle_height > 0) {
-				XMoveResizeWindow(plugin.ob_display, self->handletop,
-						theme_config.grip_width + self->bwidth + sidebwidth,
-						FRAME_HANDLE_Y(self), self->width - (theme_config.grip_width
-								+ sidebwidth) * 2, self->bwidth);
-				XMapWindow(plugin.ob_display, self->handletop);
-
-				if (self->decorations & OB_FRAME_DECOR_GRIPS) {
-					XMoveResizeWindow(plugin.ob_display, self->handleleft,
-							theme_config.grip_width, 0, self->bwidth,
-							theme_config.handle_height);
-					XMoveResizeWindow(plugin.ob_display, self->handleright,
-							self->width - theme_config.grip_width
-									- self->bwidth, 0, self->bwidth,
-							theme_config.handle_height);
-
-					XMoveResizeWindow(plugin.ob_display, self->lgriptop,
-							sidebwidth,
-							FRAME_HANDLE_Y(self), theme_config.grip_width
-									+ self->bwidth, self->bwidth);
-					XMoveResizeWindow(plugin.ob_display, self->rgriptop,
-							self->size.left + self->client_area.width
-									+ self->size.right - self->bwidth
-									- sidebwidth - theme_config.grip_width,
-							FRAME_HANDLE_Y(self), theme_config.grip_width
-									+ self->bwidth, self->bwidth);
-
-					XMapWindow(plugin.ob_display, self->handleleft);
-					XMapWindow(plugin.ob_display, self->handleright);
-					XMapWindow(plugin.ob_display, self->lgriptop);
-					XMapWindow(plugin.ob_display, self->rgriptop);
-				} else {
-					XUnmapWindow(plugin.ob_display, self->handleleft);
-					XUnmapWindow(plugin.ob_display, self->handleright);
-					XUnmapWindow(plugin.ob_display, self->lgriptop);
-					XUnmapWindow(plugin.ob_display, self->rgriptop);
-				}
-			} else {
-				XUnmapWindow(plugin.ob_display, self->handleleft);
-				XUnmapWindow(plugin.ob_display, self->handleright);
-				XUnmapWindow(plugin.ob_display, self->lgriptop);
-				XUnmapWindow(plugin.ob_display, self->rgriptop);
-
-				XUnmapWindow(plugin.ob_display, self->handletop);
-			}
-		} else {
-			XUnmapWindow(plugin.ob_display, self->handleleft);
-			XUnmapWindow(plugin.ob_display, self->handleright);
-			XUnmapWindow(plugin.ob_display, self->lgriptop);
-			XUnmapWindow(plugin.ob_display, self->rgriptop);
-
-			XUnmapWindow(plugin.ob_display, self->handletop);
-
-			XUnmapWindow(plugin.ob_display, self->handlebottom);
-			XUnmapWindow(plugin.ob_display, self->lgripleft);
-			XUnmapWindow(plugin.ob_display, self->rgripright);
-			XUnmapWindow(plugin.ob_display, self->lgripbottom);
-			XUnmapWindow(plugin.ob_display, self->rgripbottom);
-		}
-
-		if (self->decorations & OB_FRAME_DECOR_HANDLE
-				&& theme_config.handle_height > 0) {
-			XMoveResizeWindow(plugin.ob_display, self->handle, sidebwidth,
-			FRAME_HANDLE_Y(self) + self->bwidth, self->width,
-					theme_config.handle_height);
-			XMapWindow(plugin.ob_display, self->handle);
-
-			if (self->decorations & OB_FRAME_DECOR_GRIPS) {
-				XMoveResizeWindow(plugin.ob_display, self->lgrip, 0, 0,
-						theme_config.grip_width, theme_config.handle_height);
-				XMoveResizeWindow(plugin.ob_display, self->rgrip, self->width
-						- theme_config.grip_width, 0, theme_config.grip_width,
-						theme_config.handle_height);
-
-				XMapWindow(plugin.ob_display, self->lgrip);
-				XMapWindow(plugin.ob_display, self->rgrip);
-			} else {
-				XUnmapWindow(plugin.ob_display, self->lgrip);
-				XUnmapWindow(plugin.ob_display, self->rgrip);
-			}
-		} else {
-			XUnmapWindow(plugin.ob_display, self->lgrip);
-			XUnmapWindow(plugin.ob_display, self->rgrip);
-
-			XUnmapWindow(plugin.ob_display, self->handle);
-		}
-
-		if (self->bwidth && !self->max_horz && (self->client_area.height
-				+ self->size.top + self->size.bottom) > theme_config.grip_width
-				* 2) {
-			XMoveResizeWindow(plugin.ob_display, self->left, 0, self->bwidth
-					+ theme_config.grip_width, self->bwidth,
-					self->client_area.height + self->size.top
-							+ self->size.bottom - theme_config.grip_width * 2);
-
-			XMapWindow(plugin.ob_display, self->left);
-		} else
-			XUnmapWindow(plugin.ob_display, self->left);
-
-		if (self->bwidth && !self->max_horz && (self->client_area.height
-				+ self->size.top + self->size.bottom) > theme_config.grip_width
-				* 2) {
-			XMoveResizeWindow(plugin.ob_display, self->right,
-					self->client_area.width + self->cbwidth_l + self->cbwidth_r
-							+ self->bwidth, self->bwidth
-							+ theme_config.grip_width, self->bwidth,
-					self->client_area.height + self->size.top
-							+ self->size.bottom - theme_config.grip_width * 2);
-
-			XMapWindow(plugin.ob_display, self->right);
-		} else
-			XUnmapWindow(plugin.ob_display, self->right);
-
-		XMoveResizeWindow(plugin.ob_display, self->backback, self->size.left,
-				self->size.top, self->client_area.width,
-				self->client_area.height);
-	}
-
-	/* shading can change without being moved or resized */
-	RECT_SET_SIZE(self->area, self->client_area.width + self->size.left
-			+ self->size.right,
-			(self->shaded ? theme_config.title_height + self->bwidth
-					* 2 : self->client_area.height + self->size.top
-					+ self->size.bottom));
-
-	if ((is_resize) && !is_fake) {
-		/* find the new coordinates, done after setting the frame.size, for
-		 frame_client_gravity. */
-		self->area.x = self->client_area.x;
-		self->area.y = self->client_area.y;
-		frame_client_gravity(OBDEFAULTFRAME(_self)->client, &self->area.x, &self->area.y);
-	}
-
-	if (!is_fake) {
-		if (!frame_iconify_animating(self))
-			/* move and resize the top level frame.
-			 shading can change without being moved or resized.
-
-			 but don't do this during an iconify animation. it will be
-			 reflected afterwards.
-			 */
-			XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-					self->area.y, self->area.width, self->area.height);
-
-		/* when the client has StaticGravity, it likes to move around.
-		 also this correctly positions the client when it maps.
-		 this also needs to be run when the frame's decorations sizes change!
-		 */
-		if (!is_resize)
-			XMoveResizeWindow(plugin.ob_display, self->client->window,
-					self->size.left, self->size.top, self->client_area.width,
-					self->client_area.height);
-
-		if (is_resize) {
-			self->need_render = TRUE;
-			frame_update_skin(self);
-			frame_adjust_shape(self);
-		}
-
-		if (!STRUT_EQUAL(self->size, oldsize)) {
-			gulong vals[4];
-			vals[0] = self->size.left;
-			vals[1] = self->size.right;
-			vals[2] = self->size.top;
-			vals[3] = self->size.bottom;
-			OBT_PROP_SETA32(self->client->window, NET_FRAME_EXTENTS, CARDINAL,
-					vals, 4);
-			OBT_PROP_SETA32(self->client->window, KDE_NET_WM_FRAME_STRUT, CARDINAL,
-					vals, 4);
-		}
-
-		/* if this occurs while we are focus cycling, the indicator needs to
-		 match the changes */
-		if (plugin.focus_cycle_target == self->client)
-			focus_cycle_draw_indicator(self->client);
-	}
-	if (is_resize && (self->decorations & OB_FRAME_DECOR_TITLEBAR))
-		XResizeWindow(plugin.ob_display, self->label, self->label_width,
-				theme_config.label_height);
+void frame_update_layout(gpointer _self, gboolean is_resize, gboolean is_fake)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    Strut oldsize;
+
+    oldsize = self->size;
+    self->area = self->client_area;
+
+    /* do this before changing the frame's status like max_horz max_vert */
+    frame_adjust_cursors(self);
+
+    if (self->decorations & OB_FRAME_DECOR_BORDER
+            || (plugin.config_theme_keepborder)) {
+        self->bwidth = theme_config.fbwidth;
+    }
+    else {
+        self->bwidth = 0;
+    }
+
+    if (self->decorations & OB_FRAME_DECOR_BORDER) {
+        self->cbwidth_l = theme_config.cbwidthx;
+        self->cbwidth_r = theme_config.cbwidthx;
+        self->cbwidth_t = theme_config.cbwidthy;
+        self->cbwidth_b = theme_config.cbwidthy;
+    }
+    else {
+        self->cbwidth_l = 0;
+        self->cbwidth_t = 0;
+        self->cbwidth_r = 0;
+        self->cbwidth_b = 0;
+    }
+
+    if (self->max_horz) {
+        self->cbwidth_l = 0;
+        self->cbwidth_r = 0;
+        self->width = self->client_area.width;
+        if (self->max_vert)
+            self->cbwidth_b = 0;
+    }
+    else {
+        self->width = self->client_area.width + self->cbwidth_l
+                + self->cbwidth_r;
+    }
+
+    /* some elements are sized based of the width, so don't let them have
+     negative values */
+    self->width = MAX(self->width, (theme_config.grip_width + self->bwidth) * 2
+            + 1);
+
+    STRUT_SET(self->size, self->cbwidth_l
+            + (!self->max_horz ? self->bwidth : 0), self->cbwidth_t
+            + self->bwidth, self->cbwidth_r + (!self->max_horz ? self->bwidth
+            : 0), self->cbwidth_b
+            + (!self->max_horz || !self->max_vert ? self->bwidth : 0));
+
+    if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
+        self->size.top += theme_config.title_height + self->bwidth;
+    if (self->decorations & OB_FRAME_DECOR_HANDLE && theme_config.handle_height
+            > 0) {
+        self->size.bottom += theme_config.handle_height + self->bwidth;
+    }
+
+    /* position/size and map/unmap all the windows */
+    if (!is_fake) {
+        gint innercornerheight = theme_config.grip_width - self->size.bottom;
+
+        if (self->cbwidth_l) {
+            XMoveResizeWindow(plugin.ob_display, self->innerleft,
+                    self->size.left - self->cbwidth_l, self->size.top,
+                    self->cbwidth_l, self->client_area.height);
+
+            XMapWindow(plugin.ob_display, self->innerleft);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->innerleft);
+
+        if (self->cbwidth_l && innercornerheight > 0) {
+            XMoveResizeWindow(plugin.ob_display, self->innerbll, 0,
+                    self->client_area.height - (theme_config.grip_width
+                            - self->size.bottom), self->cbwidth_l,
+                    theme_config.grip_width - self->size.bottom);
+
+            XMapWindow(plugin.ob_display, self->innerbll);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->innerbll);
+
+        if (self->cbwidth_r) {
+            XMoveResizeWindow(plugin.ob_display, self->innerright,
+                    self->size.left + self->client_area.width, self->size.top,
+                    self->cbwidth_r, self->client_area.height);
+
+            XMapWindow(plugin.ob_display, self->innerright);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->innerright);
+
+        if (self->cbwidth_r && innercornerheight > 0) {
+            XMoveResizeWindow(plugin.ob_display, self->innerbrr, 0,
+                    self->client_area.height - (theme_config.grip_width
+                            - self->size.bottom), self->cbwidth_r,
+                    theme_config.grip_width - self->size.bottom);
+
+            XMapWindow(plugin.ob_display, self->innerbrr);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->innerbrr);
+
+        if (self->cbwidth_t) {
+            XMoveResizeWindow(plugin.ob_display, self->innertop,
+                    self->size.left - self->cbwidth_l, self->size.top
+                            - self->cbwidth_t, self->client_area.width
+                            + self->cbwidth_l + self->cbwidth_r,
+                    self->cbwidth_t);
+
+            XMapWindow(plugin.ob_display, self->innertop);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->innertop);
+
+        if (self->cbwidth_b) {
+            XMoveResizeWindow(plugin.ob_display, self->innerbottom,
+                    self->size.left - self->cbwidth_l, self->size.top
+                            + self->client_area.height, self->client_area.width
+                            + self->cbwidth_l + self->cbwidth_r,
+                    self->cbwidth_b);
+
+            XMoveResizeWindow(plugin.ob_display, self->innerblb, 0, 0,
+                    theme_config.grip_width + self->bwidth, self->cbwidth_b);
+            XMoveResizeWindow(plugin.ob_display, self->innerbrb,
+                    self->client_area.width + self->cbwidth_l + self->cbwidth_r
+                            - (theme_config.grip_width + self->bwidth), 0,
+                    theme_config.grip_width + self->bwidth, self->cbwidth_b);
+
+            XMapWindow(plugin.ob_display, self->innerbottom);
+            XMapWindow(plugin.ob_display, self->innerblb);
+            XMapWindow(plugin.ob_display, self->innerbrb);
+        }
+        else {
+            XUnmapWindow(plugin.ob_display, self->innerbottom);
+            XUnmapWindow(plugin.ob_display, self->innerblb);
+            XUnmapWindow(plugin.ob_display, self->innerbrb);
+        }
+
+        if (self->bwidth) {
+            gint titlesides;
+
+            /* height of titleleft and titleright */
+            titlesides = (!self->max_horz ? theme_config.grip_width : 0);
+
+            XMoveResizeWindow(plugin.ob_display, self->titletop,
+                    theme_config.grip_width + self->bwidth, 0,
+                    /* width + bwidth*2 - bwidth*2 - grips*2 */
+                    self->width - theme_config.grip_width * 2, self->bwidth);
+            XMoveResizeWindow(plugin.ob_display, self->titletopleft, 0, 0,
+                    theme_config.grip_width + self->bwidth, self->bwidth);
+            XMoveResizeWindow(plugin.ob_display, self->titletopright,
+                    self->client_area.width + self->size.left
+                            + self->size.right - theme_config.grip_width
+                            - self->bwidth, 0, theme_config.grip_width
+                            + self->bwidth, self->bwidth);
+
+            if (titlesides > 0) {
+                XMoveResizeWindow(plugin.ob_display, self->titleleft, 0,
+                        self->bwidth, self->bwidth, titlesides);
+                XMoveResizeWindow(plugin.ob_display, self->titleright,
+                        self->client_area.width + self->size.left
+                                + self->size.right - self->bwidth,
+                        self->bwidth, self->bwidth, titlesides);
+
+                XMapWindow(plugin.ob_display, self->titleleft);
+                XMapWindow(plugin.ob_display, self->titleright);
+            }
+            else {
+                XUnmapWindow(plugin.ob_display, self->titleleft);
+                XUnmapWindow(plugin.ob_display, self->titleright);
+            }
+
+            XMapWindow(plugin.ob_display, self->titletop);
+            XMapWindow(plugin.ob_display, self->titletopleft);
+            XMapWindow(plugin.ob_display, self->titletopright);
+
+            if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
+                XMoveResizeWindow(plugin.ob_display, self->titlebottom,
+                        (self->max_horz ? 0 : self->bwidth),
+                        theme_config.title_height + self->bwidth, self->width,
+                        self->bwidth);
+
+                XMapWindow(plugin.ob_display, self->titlebottom);
+            }
+            else
+                XUnmapWindow(plugin.ob_display, self->titlebottom);
+        }
+        else {
+            XUnmapWindow(plugin.ob_display, self->titlebottom);
+
+            XUnmapWindow(plugin.ob_display, self->titletop);
+            XUnmapWindow(plugin.ob_display, self->titletopleft);
+            XUnmapWindow(plugin.ob_display, self->titletopright);
+            XUnmapWindow(plugin.ob_display, self->titleleft);
+            XUnmapWindow(plugin.ob_display, self->titleright);
+        }
+
+        if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
+            XMoveResizeWindow(plugin.ob_display, self->title,
+                    (self->max_horz ? 0 : self->bwidth), self->bwidth,
+                    self->width, theme_config.title_height);
+
+            XMapWindow(plugin.ob_display, self->title);
+
+            if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+                XMoveResizeWindow(plugin.ob_display, self->topresize,
+                        theme_config.grip_width, 0, self->width
+                                - theme_config.grip_width *2,
+                        theme_config.paddingy + 1);
+
+                XMoveWindow(plugin.ob_display, self->tltresize, 0, 0);
+                XMoveWindow(plugin.ob_display, self->tllresize, 0, 0);
+                XMoveWindow(plugin.ob_display, self->trtresize, self->width
+                        - theme_config.grip_width, 0);
+                XMoveWindow(plugin.ob_display, self->trrresize, self->width
+                        - theme_config.paddingx - 1, 0);
+
+                XMapWindow(plugin.ob_display, self->topresize);
+                XMapWindow(plugin.ob_display, self->tltresize);
+                XMapWindow(plugin.ob_display, self->tllresize);
+                XMapWindow(plugin.ob_display, self->trtresize);
+                XMapWindow(plugin.ob_display, self->trrresize);
+            }
+            else {
+                XUnmapWindow(plugin.ob_display, self->topresize);
+                XUnmapWindow(plugin.ob_display, self->tltresize);
+                XUnmapWindow(plugin.ob_display, self->tllresize);
+                XUnmapWindow(plugin.ob_display, self->trtresize);
+                XUnmapWindow(plugin.ob_display, self->trrresize);
+            }
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->title);
+    }
+
+    if ((self->decorations & OB_FRAME_DECOR_TITLEBAR))
+        /* layout the title bar elements */
+        layout_title(self);
+
+    if (!is_fake) {
+        gint sidebwidth = self->max_horz ? 0 : self->bwidth;
+
+        if (self->bwidth && self->size.bottom) {
+            XMoveResizeWindow(plugin.ob_display, self->handlebottom,
+                    theme_config.grip_width + self->bwidth + sidebwidth,
+                    self->size.top + self->client_area.height
+                            + self->size.bottom - self->bwidth, self->width
+                            - (theme_config.grip_width + sidebwidth) * 2,
+                    self->bwidth);
+
+            if (sidebwidth) {
+                XMoveResizeWindow(plugin.ob_display, self->lgripleft, 0,
+                        self->size.top + self->client_area.height
+                                + self->size.bottom
+                                - (!self->max_horz ? theme_config.grip_width
+                                        : self->size.bottom - self->cbwidth_b),
+                        self->bwidth,
+                        (!self->max_horz ? theme_config.grip_width
+                                : self->size.bottom - self->cbwidth_b));
+                XMoveResizeWindow(plugin.ob_display, self->rgripright,
+                        self->size.left + self->client_area.width
+                                + self->size.right - self->bwidth,
+                        self->size.top + self->client_area.height
+                                + self->size.bottom
+                                - (!self->max_horz ? theme_config.grip_width
+                                        : self->size.bottom - self->cbwidth_b),
+                        self->bwidth,
+                        (!self->max_horz ? theme_config.grip_width
+                                : self->size.bottom - self->cbwidth_b));
+
+                XMapWindow(plugin.ob_display, self->lgripleft);
+                XMapWindow(plugin.ob_display, self->rgripright);
+            }
+            else {
+                XUnmapWindow(plugin.ob_display, self->lgripleft);
+                XUnmapWindow(plugin.ob_display, self->rgripright);
+            }
+
+            XMoveResizeWindow(plugin.ob_display, self->lgripbottom, sidebwidth,
+                    self->size.top + self->client_area.height
+                            + self->size.bottom - self->bwidth,
+                    theme_config.grip_width + self->bwidth, self->bwidth);
+            XMoveResizeWindow(plugin.ob_display, self->rgripbottom,
+                    self->size.left + self->client_area.width
+                            + self->size.right - self->bwidth - sidebwidth
+                            - theme_config.grip_width, self->size.top
+                            + self->client_area.height + self->size.bottom
+                            - self->bwidth, theme_config.grip_width
+                            + self->bwidth, self->bwidth);
+
+            XMapWindow(plugin.ob_display, self->handlebottom);
+            XMapWindow(plugin.ob_display, self->lgripbottom);
+            XMapWindow(plugin.ob_display, self->rgripbottom);
+
+            if (self->decorations & OB_FRAME_DECOR_HANDLE
+                    && theme_config.handle_height > 0) {
+                XMoveResizeWindow(plugin.ob_display, self->handletop,
+                        theme_config.grip_width + self->bwidth + sidebwidth, 
+                        FRAME_HANDLE_Y(self), self->width - (theme_config.grip_width
+                                + sidebwidth) * 2, self->bwidth);
+                XMapWindow(plugin.ob_display, self->handletop);
+
+                if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+                    XMoveResizeWindow(plugin.ob_display, self->handleleft,
+                            theme_config.grip_width, 0, self->bwidth,
+                            theme_config.handle_height);
+                    XMoveResizeWindow(plugin.ob_display, self->handleright,
+                            self->width - theme_config.grip_width
+                                    - self->bwidth, 0, self->bwidth,
+                            theme_config.handle_height);
+
+                    XMoveResizeWindow(plugin.ob_display, self->lgriptop,
+                            sidebwidth, 
+                            FRAME_HANDLE_Y(self), theme_config.grip_width
+                                    + self->bwidth, self->bwidth);
+                    XMoveResizeWindow(plugin.ob_display, self->rgriptop,
+                            self->size.left + self->client_area.width
+                                    + self->size.right - self->bwidth
+                                    - sidebwidth - theme_config.grip_width, 
+                            FRAME_HANDLE_Y(self), theme_config.grip_width
+                                    + self->bwidth, self->bwidth);
+
+                    XMapWindow(plugin.ob_display, self->handleleft);
+                    XMapWindow(plugin.ob_display, self->handleright);
+                    XMapWindow(plugin.ob_display, self->lgriptop);
+                    XMapWindow(plugin.ob_display, self->rgriptop);
+                }
+                else {
+                    XUnmapWindow(plugin.ob_display, self->handleleft);
+                    XUnmapWindow(plugin.ob_display, self->handleright);
+                    XUnmapWindow(plugin.ob_display, self->lgriptop);
+                    XUnmapWindow(plugin.ob_display, self->rgriptop);
+                }
+            }
+            else {
+                XUnmapWindow(plugin.ob_display, self->handleleft);
+                XUnmapWindow(plugin.ob_display, self->handleright);
+                XUnmapWindow(plugin.ob_display, self->lgriptop);
+                XUnmapWindow(plugin.ob_display, self->rgriptop);
+
+                XUnmapWindow(plugin.ob_display, self->handletop);
+            }
+        }
+        else {
+            XUnmapWindow(plugin.ob_display, self->handleleft);
+            XUnmapWindow(plugin.ob_display, self->handleright);
+            XUnmapWindow(plugin.ob_display, self->lgriptop);
+            XUnmapWindow(plugin.ob_display, self->rgriptop);
+
+            XUnmapWindow(plugin.ob_display, self->handletop);
+
+            XUnmapWindow(plugin.ob_display, self->handlebottom);
+            XUnmapWindow(plugin.ob_display, self->lgripleft);
+            XUnmapWindow(plugin.ob_display, self->rgripright);
+            XUnmapWindow(plugin.ob_display, self->lgripbottom);
+            XUnmapWindow(plugin.ob_display, self->rgripbottom);
+        }
+
+        if (self->decorations & OB_FRAME_DECOR_HANDLE
+                && theme_config.handle_height > 0) {
+            XMoveResizeWindow(plugin.ob_display, self->handle, sidebwidth, 
+            FRAME_HANDLE_Y(self) + self->bwidth, self->width,
+                    theme_config.handle_height);
+            XMapWindow(plugin.ob_display, self->handle);
+
+            if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+                XMoveResizeWindow(plugin.ob_display, self->lgrip, 0, 0,
+                        theme_config.grip_width, theme_config.handle_height);
+                XMoveResizeWindow(plugin.ob_display, self->rgrip, self->width
+                        - theme_config.grip_width, 0, theme_config.grip_width,
+                        theme_config.handle_height);
+
+                XMapWindow(plugin.ob_display, self->lgrip);
+                XMapWindow(plugin.ob_display, self->rgrip);
+            }
+            else {
+                XUnmapWindow(plugin.ob_display, self->lgrip);
+                XUnmapWindow(plugin.ob_display, self->rgrip);
+            }
+        }
+        else {
+            XUnmapWindow(plugin.ob_display, self->lgrip);
+            XUnmapWindow(plugin.ob_display, self->rgrip);
+
+            XUnmapWindow(plugin.ob_display, self->handle);
+        }
+
+        if (self->bwidth && !self->max_horz && (self->client_area.height
+                + self->size.top + self->size.bottom) > theme_config.grip_width
+                * 2) {
+            XMoveResizeWindow(plugin.ob_display, self->left, 0, self->bwidth
+                    + theme_config.grip_width, self->bwidth,
+                    self->client_area.height + self->size.top
+                            + self->size.bottom - theme_config.grip_width * 2);
+
+            XMapWindow(plugin.ob_display, self->left);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->left);
+
+        if (self->bwidth && !self->max_horz && (self->client_area.height
+                + self->size.top + self->size.bottom) > theme_config.grip_width
+                * 2) {
+            XMoveResizeWindow(plugin.ob_display, self->right,
+                    self->client_area.width + self->cbwidth_l + self->cbwidth_r
+                            + self->bwidth, self->bwidth
+                            + theme_config.grip_width, self->bwidth,
+                    self->client_area.height + self->size.top
+                            + self->size.bottom - theme_config.grip_width * 2);
+
+            XMapWindow(plugin.ob_display, self->right);
+        }
+        else
+            XUnmapWindow(plugin.ob_display, self->right);
+
+        XMoveResizeWindow(plugin.ob_display, self->backback, self->size.left,
+                self->size.top, self->client_area.width,
+                self->client_area.height);
+    }
+
+    /* shading can change without being moved or resized */
+    RECT_SET_SIZE(self->area, self->client_area.width + self->size.left
+            + self->size.right, (self->shaded ? theme_config.title_height
+            + self->bwidth * 2 : self->client_area.height + self->size.top
+            + self->size.bottom));
+
+    if ((is_resize) && !is_fake) {
+        /* find the new coordinates, done after setting the frame.size, for
+         frame_client_gravity. */
+        self->area.x = self->client_area.x;
+        self->area.y = self->client_area.y;
+        frame_client_gravity(OBDEFAULTFRAME(_self)->client, &self->area.x, &self->area.y);
+    }
+
+    if (!is_fake) {
+        if (!frame_iconify_animating(self))
+            /* move and resize the top level frame.
+             shading can change without being moved or resized.
+
+             but don't do this during an iconify animation. it will be
+             reflected afterwards.
+             */
+            XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
+                    self->area.y, self->area.width, self->area.height);
+
+        /* when the client has StaticGravity, it likes to move around.
+         also this correctly positions the client when it maps.
+         this also needs to be run when the frame's decorations sizes change!
+         */
+        if (!is_resize)
+            XMoveResizeWindow(plugin.ob_display, self->client->window,
+                    self->size.left, self->size.top, self->client_area.width,
+                    self->client_area.height);
+
+        if (is_resize) {
+            self->need_render = TRUE;
+            frame_update_skin(self);
+            frame_adjust_shape(self);
+        }
+
+        if (!STRUT_EQUAL(self->size, oldsize)) {
+            gulong vals[4];
+            vals[0] = self->size.left;
+            vals[1] = self->size.right;
+            vals[2] = self->size.top;
+            vals[3] = self->size.bottom;
+            OBT_PROP_SETA32(self->client->window, NET_FRAME_EXTENTS, CARDINAL,
+                    vals, 4);
+            OBT_PROP_SETA32(self->client->window, KDE_NET_WM_FRAME_STRUT,
+                    CARDINAL, vals, 4);
+        }
+
+        /* if this occurs while we are focus cycling, the indicator needs to
+         match the changes */
+        if (plugin.focus_cycle_target == self->client)
+            focus_cycle_draw_indicator(self->client);
+    }
+    if (is_resize && (self->decorations & OB_FRAME_DECOR_TITLEBAR))
+        XResizeWindow(plugin.ob_display, self->label, self->label_width,
+                theme_config.label_height);
 }
 
-void frame_set_hover_flag(gpointer self, ObFrameButton button) {
-	if (OBDEFAULTFRAME(self)->hover_flag != button) {
-		OBDEFAULTFRAME(self)->hover_flag = button;
-		frame_update_skin(self);
-	}
+void frame_set_hover_flag(gpointer self, ObFrameButton button)
+{
+    if (OBDEFAULTFRAME(self)->hover_flag != button) {
+        OBDEFAULTFRAME(self)->hover_flag = button;
+        frame_update_skin(self);
+    }
 }
 
-void frame_set_press_flag(gpointer self, ObFrameButton button) {
-	if (OBDEFAULTFRAME(self)->press_flag != button) {
-		OBDEFAULTFRAME(self)->press_flag = button;
-		frame_update_skin(self);
-	}
+void frame_set_press_flag(gpointer self, ObFrameButton button)
+{
+    if (OBDEFAULTFRAME(self)->press_flag != button) {
+        OBDEFAULTFRAME(self)->press_flag = button;
+        frame_update_skin(self);
+    }
 }
 
-Window frame_get_window(gpointer self) {
-	return OBDEFAULTFRAME(self)->window;
+Window frame_get_window(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->window;
 }
 
-Strut frame_get_size(gpointer self) {
-	return OBDEFAULTFRAME(self)->size;
+Strut frame_get_size(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->size;
 }
 
-gint frame_get_decorations(gpointer self) {
-	return OBDEFAULTFRAME(self)->decorations;
+gint frame_get_decorations(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->decorations;
 }
 
-gboolean frame_is_visible(gpointer self) {
-	return OBDEFAULTFRAME(self)->visible;
+gboolean frame_is_visible(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->visible;
 }
 
-gboolean frame_is_max_horz(gpointer self) {
-	return OBDEFAULTFRAME(self)->max_horz;
+gboolean frame_is_max_horz(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->max_horz;
 }
 
-gboolean frame_is_max_vert(gpointer self) {
-	return OBDEFAULTFRAME(self)->max_vert;
+gboolean frame_is_max_vert(gpointer self)
+{
+    return OBDEFAULTFRAME(self)->max_vert;
 }
 
-gulong frame_animate_iconify_time_left(gpointer _self,
-		const GTimeVal *now) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	glong sec, usec;
-	sec = self->iconify_animation_end.tv_sec - now->tv_sec;
-	usec = self->iconify_animation_end.tv_usec - now->tv_usec;
-	if (usec < 0) {
-		usec += G_USEC_PER_SEC;
-		sec--;
-	}
-	/* no negative values */
-	return MAX(sec * G_USEC_PER_SEC + usec, 0);
+gulong frame_animate_iconify_time_left(gpointer _self, const GTimeVal *now)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    glong sec, usec;
+    sec = self->iconify_animation_end.tv_sec - now->tv_sec;
+    usec = self->iconify_animation_end.tv_usec - now->tv_usec;
+    if (usec < 0) {
+        usec += G_USEC_PER_SEC;
+        sec--;
+    }
+    /* no negative values */
+    return MAX(sec * G_USEC_PER_SEC + usec, 0);
 }
 
-gboolean frame_animate_iconify(gpointer p) {
-	ObDefaultFrame *self = p;
-	gint x, y, w, h;
-	gint iconx, icony, iconw;
-	GTimeVal now;
-	gulong time;
-	gboolean iconifying;
-
-	if (self->client->icon_geometry.width == 0) {
-		/* there is no icon geometry set so just go straight down */
-		Rect *a =
-				screen_physical_area_monitor(screen_find_monitor(&self->area));
-		iconx = self->area.x + self->area.width / 2 + 32;
-		icony = a->y + a->width;
-		iconw = 64;
-		g_free(a);
-	} else {
-		iconx = self->client->icon_geometry.x;
-		icony = self->client->icon_geometry.y;
-		iconw = self->client->icon_geometry.width;
-	}
-
-	iconifying = self->iconify_animation_going > 0;
-
-	/* how far do we have left to go ? */
-	g_get_current_time(&now);
-	time = frame_animate_iconify_time_left(self, &now);
-
-	if (time == 0 || iconifying) {
-		/* start where the frame is supposed to be */
-		x = self->area.x;
-		y = self->area.y;
-		w = self->area.width;
-		h = self->area.height;
-	} else {
-		/* start at the icon */
-		x = iconx;
-		y = icony;
-		w = iconw;
-		h = self->size.top; /* just the titlebar */
-	}
-
-	if (time > 0) {
-		glong dx, dy, dw;
-		glong elapsed;
-
-		dx = self->area.x - iconx;
-		dy = self->area.y - icony;
-		dw = self->area.width - self->bwidth * 2 - iconw;
-		/* if restoring, we move in the opposite direction */
-		if (!iconifying) {
-			dx = -dx;
-			dy = -dy;
-			dw = -dw;
-		}
-
-		elapsed = FRAME_ANIMATE_ICONIFY_TIME - time;
-		x = x - (dx * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
-		y = y - (dy * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
-		w = w - (dw * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
-		h = self->size.top; /* just the titlebar */
-	}
-
-	if (time == 0)
-		frame_end_iconify_animation(self);
-	else {
-		XMoveResizeWindow(plugin.ob_display, self->window, x, y, w, h);
-		XFlush(plugin.ob_display);
-	}
-
-	return time > 0; /* repeat until we're out of time */
+gboolean frame_animate_iconify(gpointer p)
+{
+    ObDefaultFrame *self = p;
+    gint x, y, w, h;
+    gint iconx, icony, iconw;
+    GTimeVal now;
+    gulong time;
+    gboolean iconifying;
+
+    if (self->client->icon_geometry.width == 0) {
+        /* there is no icon geometry set so just go straight down */
+        Rect *a =
+                screen_physical_area_monitor(screen_find_monitor(&self->area));
+        iconx = self->area.x + self->area.width / 2 + 32;
+        icony = a->y + a->width;
+        iconw = 64;
+        g_free(a);
+    }
+    else {
+        iconx = self->client->icon_geometry.x;
+        icony = self->client->icon_geometry.y;
+        iconw = self->client->icon_geometry.width;
+    }
+
+    iconifying = self->iconify_animation_going > 0;
+
+    /* how far do we have left to go ? */
+    g_get_current_time(&now);
+    time = frame_animate_iconify_time_left(self, &now);
+
+    if (time == 0 || iconifying) {
+        /* start where the frame is supposed to be */
+        x = self->area.x;
+        y = self->area.y;
+        w = self->area.width;
+        h = self->area.height;
+    }
+    else {
+        /* start at the icon */
+        x = iconx;
+        y = icony;
+        w = iconw;
+        h = self->size.top; /* just the titlebar */
+    }
+
+    if (time > 0) {
+        glong dx, dy, dw;
+        glong elapsed;
+
+        dx = self->area.x - iconx;
+        dy = self->area.y - icony;
+        dw = self->area.width - self->bwidth * 2 - iconw;
+        /* if restoring, we move in the opposite direction */
+        if (!iconifying) {
+            dx = -dx;
+            dy = -dy;
+            dw = -dw;
+        }
+
+        elapsed = FRAME_ANIMATE_ICONIFY_TIME - time;
+        x = x - (dx * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
+        y = y - (dy * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
+        w = w - (dw * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
+        h = self->size.top; /* just the titlebar */
+    }
+
+    if (time == 0)
+        frame_end_iconify_animation(self);
+    else {
+        XMoveResizeWindow(plugin.ob_display, self->window, x, y, w, h);
+        XFlush(plugin.ob_display);
+    }
+
+    return time > 0; /* repeat until we're out of time */
 }
 
-void frame_adjust_cursors(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	if ((self->functions & OB_CLIENT_FUNC_RESIZE) != (self->functions
-			& OB_CLIENT_FUNC_RESIZE) || self->max_horz
-			!= self->max_horz || self->max_vert
-			!= self->max_vert || self->shaded != self->shaded) {
-		gboolean r = (self->functions & OB_CLIENT_FUNC_RESIZE)
-				&& !(self->max_horz && self->max_vert);
-		gboolean topbot = !self->max_vert;
-		gboolean sh = self->shaded;
-		XSetWindowAttributes a;
-
-		/* these ones turn off when max vert, and some when shaded */
-		a.cursor = ob_cursor(r && topbot && !sh ? OB_CURSOR_NORTH
-				: OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->topresize, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->titletop, CWCursor, &a);
-		a.cursor = ob_cursor(r && topbot ? OB_CURSOR_SOUTH : OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->handle, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->handletop, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->handlebottom,
-				CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerbottom, CWCursor,
-				&a);
-
-		/* these ones change when shaded */
-		a.cursor = ob_cursor(r ? (sh ? OB_CURSOR_WEST : OB_CURSOR_NORTHWEST)
-				: OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->titleleft, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->tltresize, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->tllresize, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->titletopleft,
-				CWCursor, &a);
-		a.cursor = ob_cursor(r ? (sh ? OB_CURSOR_EAST : OB_CURSOR_NORTHEAST)
-				: OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->titleright, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->trtresize, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->trrresize, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->titletopright,
-				CWCursor, &a);
-
-		/* these ones are pretty static */
-		a.cursor = ob_cursor(r ? OB_CURSOR_WEST : OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->left, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerleft, CWCursor,
-				&a);
-		a.cursor = ob_cursor(r ? OB_CURSOR_EAST : OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->right, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerright, CWCursor,
-				&a);
-		a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHWEST : OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->lgrip, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->handleleft, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->lgripleft, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->lgriptop, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->lgripbottom, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerbll, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerblb, CWCursor, &a);
-		a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHEAST : OB_CURSOR_NONE);
-		XChangeWindowAttributes(plugin.ob_display, self->rgrip, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->handleright, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->rgripright, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->rgriptop, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->rgripbottom, CWCursor,
-				&a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerbrr, CWCursor, &a);
-		XChangeWindowAttributes(plugin.ob_display, self->innerbrb, CWCursor, &a);
-	}
+void frame_adjust_cursors(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    if ((self->functions & OB_CLIENT_FUNC_RESIZE) != (self->functions
+            & OB_CLIENT_FUNC_RESIZE) || self->max_horz != self->max_horz
+            || self->max_vert != self->max_vert || self->shaded != self->shaded) {
+        gboolean r = (self->functions & OB_CLIENT_FUNC_RESIZE)
+                && !(self->max_horz && self->max_vert);
+        gboolean topbot = !self->max_vert;
+        gboolean sh = self->shaded;
+        XSetWindowAttributes a;
+
+        /* these ones turn off when max vert, and some when shaded */
+        a.cursor = ob_cursor(r && topbot && !sh ? OB_CURSOR_NORTH
+                : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->topresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->titletop, CWCursor, &a);
+        a.cursor = ob_cursor(r && topbot ? OB_CURSOR_SOUTH : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->handle, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handletop, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handlebottom,
+                CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbottom, CWCursor,
+                &a);
+
+        /* these ones change when shaded */
+        a.cursor = ob_cursor(r ? (sh ? OB_CURSOR_WEST : OB_CURSOR_NORTHWEST)
+                : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->titleleft, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->tltresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->tllresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->titletopleft,
+                CWCursor, &a);
+        a.cursor = ob_cursor(r ? (sh ? OB_CURSOR_EAST : OB_CURSOR_NORTHEAST)
+                : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->titleright, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->trtresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->trrresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->titletopright,
+                CWCursor, &a);
+
+        /* these ones are pretty static */
+        a.cursor = ob_cursor(r ? OB_CURSOR_WEST : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->left, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerleft, CWCursor,
+                &a);
+        a.cursor = ob_cursor(r ? OB_CURSOR_EAST : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->right, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerright, CWCursor,
+                &a);
+        a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHWEST : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->lgrip, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handleleft, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgripleft, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgriptop, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgripbottom, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbll, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerblb, CWCursor, &a);
+        a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHEAST : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->rgrip, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handleright, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->rgripright, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->rgriptop, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->rgripbottom, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbrr, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbrb, CWCursor, &a);
+    }
 }
 
-void frame_adjust_client_area(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	/* adjust the window which is there to prevent flashing on unmap */
-	XMoveResizeWindow(plugin.ob_display, self->backfront, 0, 0,
-			self->client_area.width, self->client_area.height);
+void frame_adjust_client_area(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    /* adjust the window which is there to prevent flashing on unmap */
+    XMoveResizeWindow(plugin.ob_display, self->backfront, 0, 0,
+            self->client_area.width, self->client_area.height);
 }
 
-void frame_adjust_state(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	self->need_render = TRUE;
-	frame_update_skin(self);
+void frame_adjust_state(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    self->need_render = TRUE;
+    frame_update_skin(self);
 }
 
-void frame_adjust_focus(gpointer _self, gboolean hilite) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	self->focused = hilite;
-	self->need_render = TRUE;
-	frame_update_skin(self);
-	XFlush(plugin.ob_display);
+void frame_adjust_focus(gpointer _self, gboolean hilite)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    self->focused = hilite;
+    self->need_render = TRUE;
+    frame_update_skin(self);
+    XFlush(plugin.ob_display);
 }
 
-void frame_adjust_title(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	self->need_render = TRUE;
-	frame_update_skin(self);
+void frame_adjust_title(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    self->need_render = TRUE;
+    frame_update_skin(self);
 }
 
-void frame_adjust_icon(gpointer _self) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	self->need_render = TRUE;
-	frame_update_skin(self);
+void frame_adjust_icon(gpointer _self)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    self->need_render = TRUE;
+    frame_update_skin(self);
 }
 
 /* is there anything present between us and the label? */
 static gboolean is_button_present(ObDefaultFrame *_self, const gchar *lc,
-		gint dir) {
-	ObDefaultFrame * self = (ObDefaultFrame *) _self;
-	for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir) {
-		if (*lc == ' ')
-			continue; /* it was invalid */
-		if (*lc == 'N' && self->decorations & OB_FRAME_DECOR_ICON)
-			return TRUE;
-		if (*lc == 'D' && self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
-			return TRUE;
-		if (*lc == 'S' && self->decorations & OB_FRAME_DECOR_SHADE)
-			return TRUE;
-		if (*lc == 'I' && self->decorations & OB_FRAME_DECOR_ICONIFY)
-			return TRUE;
-		if (*lc == 'M' && self->decorations & OB_FRAME_DECOR_MAXIMIZE)
-			return TRUE;
-		if (*lc == 'C' && self->decorations & OB_FRAME_DECOR_CLOSE)
-			return TRUE;
-		if (*lc == 'L')
-			return FALSE;
-	}
-	return FALSE;
+        gint dir)
+{
+    ObDefaultFrame * self = (ObDefaultFrame *) _self;
+    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir) {
+        if (*lc == ' ')
+            continue; /* it was invalid */
+        if (*lc == 'N' && self->decorations & OB_FRAME_DECOR_ICON)
+            return TRUE;
+        if (*lc == 'D' && self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
+            return TRUE;
+        if (*lc == 'S' && self->decorations & OB_FRAME_DECOR_SHADE)
+            return TRUE;
+        if (*lc == 'I' && self->decorations & OB_FRAME_DECOR_ICONIFY)
+            return TRUE;
+        if (*lc == 'M' && self->decorations & OB_FRAME_DECOR_MAXIMIZE)
+            return TRUE;
+        if (*lc == 'C' && self->decorations & OB_FRAME_DECOR_CLOSE)
+            return TRUE;
+        if (*lc == 'L')
+            return FALSE;
+    }
+    return FALSE;
 }
 
-void flash_done(gpointer data) {
-	ObDefaultFrame *self = data;
+void flash_done(gpointer data)
+{
+    ObDefaultFrame *self = data;
 
-	if (self->focused != self->flash_on)
-		frame_adjust_focus(self, self->focused);
+    if (self->focused != self->flash_on)
+        frame_adjust_focus(self, self->focused);
 }
 
-gboolean flash_timeout(gpointer data) {
-	ObDefaultFrame *self = data;
-	GTimeVal now;
+gboolean flash_timeout(gpointer data)
+{
+    ObDefaultFrame *self = data;
+    GTimeVal now;
 
-	g_get_current_time(&now);
-	if (now.tv_sec > self->flash_end.tv_sec
-			|| (now.tv_sec == self->flash_end.tv_sec && now.tv_usec
-					>= self->flash_end.tv_usec))
-		self->flashing = FALSE;
+    g_get_current_time(&now);
+    if (now.tv_sec > self->flash_end.tv_sec
+            || (now.tv_sec == self->flash_end.tv_sec && now.tv_usec
+                    >= self->flash_end.tv_usec))
+        self->flashing = FALSE;
 
-	if (!self->flashing)
-		return FALSE; /* we are done */
+    if (!self->flashing)
+        return FALSE; /* we are done */
 
-	self->flash_on = !self->flash_on;
-	if (!self->focused) {
-		frame_adjust_focus(self, self->flash_on);
-		self->focused = FALSE;
-	}
+    self->flash_on = !self->flash_on;
+    if (!self->focused) {
+        frame_adjust_focus(self, self->flash_on);
+        self->focused = FALSE;
+    }
 
-	return TRUE; /* go again */
+    return TRUE; /* go again */
 }
 
-void layout_title(ObDefaultFrame * self) {
-	gchar *lc;
-	gint i;
-
-	const gint bwidth = theme_config.button_size + theme_config.paddingx + 1;
-	/* position of the left most button */
-	const gint left = theme_config.paddingx + 1;
-	/* position of the right most button */
-	const gint right = self->width;
-
-	/* turn them all off */
-	self->icon_on = self->desk_on = self->shade_on = self->iconify_on
-			= self->max_on = self->close_on = self->label_on = FALSE;
-	self->label_width = self->width - (theme_config.paddingx + 1) * 2;
-	self->leftmost = self->rightmost = OB_FRAME_CONTEXT_NONE;
-
-	/* figure out what's being show, find each element's position, and the
-	 width of the label
-
-	 do the ones before the label, then after the label,
-	 i will be +1 the first time through when working to the left,
-	 and -1 the second time through when working to the right */
-	for (i = 1; i >= -1; i-=2) {
-		gint x;
-		ObFrameContext *firstcon;
-
-		if (i > 0) {
-			x = left;
-			lc = plugin.config_title_layout;
-			firstcon = &self->leftmost;
-		} else {
-			x = right;
-			lc = plugin.config_title_layout
-					+ strlen(plugin.config_title_layout)-1;
-			firstcon = &self->rightmost;
-		}
-
-		/* stop at the end of the string (or the label, which calls break) */
-		for (; *lc != '\0' && lc >= plugin.config_title_layout; lc+=i) {
-			if (*lc == 'L') {
-				if (i > 0) {
-					self->label_on = TRUE;
-					self->label_x = x;
-				}
-				break; /* break the for loop, do other side of label */
-			} else if (*lc == 'N') {
-				if (firstcon)
-					*firstcon = OB_FRAME_CONTEXT_ICON;
-				if ((self->icon_on = is_button_present(self, lc, i))) {
-					/* icon is bigger than buttons */
-					self->label_width -= bwidth + 2;
-					if (i > 0)
-						self->icon_x = x;
-					x += i * (bwidth + 2);
-					if (i < 0)
-						self->icon_x = x;
-				}
-			} else if (*lc == 'D') {
-				if (firstcon)
-					*firstcon = OB_FRAME_CONTEXT_ALLDESKTOPS;
-				if ((self->desk_on = is_button_present(self, lc, i))) {
-					self->label_width -= bwidth;
-					if (i > 0)
-						self->desk_x = x;
-					x += i * bwidth;
-					if (i < 0)
-						self->desk_x = x;
-				}
-			} else if (*lc == 'S') {
-				if (firstcon)
-					*firstcon = OB_FRAME_CONTEXT_SHADE;
-				if ((self->shade_on = is_button_present(self, lc, i))) {
-					self->label_width -= bwidth;
-					if (i > 0)
-						self->shade_x = x;
-					x += i * bwidth;
-					if (i < 0)
-						self->shade_x = x;
-				}
-			} else if (*lc == 'I') {
-				if (firstcon)
-					*firstcon = OB_FRAME_CONTEXT_ICONIFY;
-				if ((self->iconify_on = is_button_present(self, lc, i))) {
-					self->label_width -= bwidth;
-					if (i > 0)
-						self->iconify_x = x;
-					x += i * bwidth;
-					if (i < 0)
-						self->iconify_x = x;
-				}
-			} else if (*lc == 'M') {
-				if (firstcon)
-					*firstcon = OB_FRAME_CONTEXT_MAXIMIZE;
-				if ((self->max_on = is_button_present(self, lc, i))) {
-					self->label_width -= bwidth;
-					if (i > 0)
-						self->max_x = x;
-					x += i * bwidth;
-					if (i < 0)
-						self->max_x = x;
-				}
-			} else if (*lc == 'C') {
-				if (firstcon)
-					*firstcon = OB_FRAME_CONTEXT_CLOSE;
-				if ((self->close_on = is_button_present(self, lc, i))) {
-					self->label_width -= bwidth;
-					if (i > 0)
-						self->close_x = x;
-					x += i * bwidth;
-					if (i < 0)
-						self->close_x = x;
-				}
-			} else
-				continue; /* don't set firstcon */
-			firstcon = NULL;
-		}
-	}
-
-	/* position and map the elements */
-	if (self->icon_on) {
-		XMapWindow(plugin.ob_display, self->icon);
-		XMoveWindow(plugin.ob_display, self->icon, self->icon_x,
-				theme_config.paddingy);
-	} else
-		XUnmapWindow(plugin.ob_display, self->icon);
-
-	if (self->desk_on) {
-		XMapWindow(plugin.ob_display, self->desk);
-		XMoveWindow(plugin.ob_display, self->desk, self->desk_x,
-				theme_config.paddingy + 1);
-	} else
-		XUnmapWindow(plugin.ob_display, self->desk);
-
-	if (self->shade_on) {
-		XMapWindow(plugin.ob_display, self->shade);
-		XMoveWindow(plugin.ob_display, self->shade, self->shade_x,
-				theme_config.paddingy + 1);
-	} else
-		XUnmapWindow(plugin.ob_display, self->shade);
-
-	if (self->iconify_on) {
-		XMapWindow(plugin.ob_display, self->iconify);
-		XMoveWindow(plugin.ob_display, self->iconify, self->iconify_x,
-				theme_config.paddingy + 1);
-	} else
-		XUnmapWindow(plugin.ob_display, self->iconify);
-
-	if (self->max_on) {
-		XMapWindow(plugin.ob_display, self->max);
-		XMoveWindow(plugin.ob_display, self->max, self->max_x,
-				theme_config.paddingy + 1);
-	} else
-		XUnmapWindow(plugin.ob_display, self->max);
-
-	if (self->close_on) {
-		XMapWindow(plugin.ob_display, self->close);
-		XMoveWindow(plugin.ob_display, self->close, self->close_x,
-				theme_config.paddingy + 1);
-	} else
-		XUnmapWindow(plugin.ob_display, self->close);
-
-	if (self->label_on) {
-		self->label_width = MAX(1, self->label_width); /* no lower than 1 */
-		XMapWindow(plugin.ob_display, self->label);
-		XMoveWindow(plugin.ob_display, self->label, self->label_x,
-				theme_config.paddingy);
-	} else
-		XUnmapWindow(plugin.ob_display, self->label);
+void layout_title(ObDefaultFrame * self)
+{
+    gchar *lc;
+    gint i;
+
+    const gint bwidth = theme_config.button_size + theme_config.paddingx + 1;
+    /* position of the left most button */
+    const gint left = theme_config.paddingx + 1;
+    /* position of the right most button */
+    const gint right = self->width;
+
+    /* turn them all off */
+    self->icon_on = self->desk_on = self->shade_on = self->iconify_on
+            = self->max_on = self->close_on = self->label_on = FALSE;
+    self->label_width = self->width - (theme_config.paddingx + 1) * 2;
+    self->leftmost = self->rightmost = OB_FRAME_CONTEXT_NONE;
+
+    /* figure out what's being show, find each element's position, and the
+     width of the label
+
+     do the ones before the label, then after the label,
+     i will be +1 the first time through when working to the left,
+     and -1 the second time through when working to the right */
+    for (i = 1; i >= -1; i-=2) {
+        gint x;
+        ObFrameContext *firstcon;
+
+        if (i > 0) {
+            x = left;
+            lc = plugin.config_title_layout;
+            firstcon = &self->leftmost;
+        }
+        else {
+            x = right;
+            lc = plugin.config_title_layout
+                    + strlen(plugin.config_title_layout)-1;
+            firstcon = &self->rightmost;
+        }
+
+        /* stop at the end of the string (or the label, which calls break) */
+        for (; *lc != '\0' && lc >= plugin.config_title_layout; lc+=i) {
+            if (*lc == 'L') {
+                if (i > 0) {
+                    self->label_on = TRUE;
+                    self->label_x = x;
+                }
+                break; /* break the for loop, do other side of label */
+            }
+            else if (*lc == 'N') {
+                if (firstcon)
+                    *firstcon = OB_FRAME_CONTEXT_ICON;
+                if ((self->icon_on = is_button_present(self, lc, i))) {
+                    /* icon is bigger than buttons */
+                    self->label_width -= bwidth + 2;
+                    if (i > 0)
+                        self->icon_x = x;
+                    x += i * (bwidth + 2);
+                    if (i < 0)
+                        self->icon_x = x;
+                }
+            }
+            else if (*lc == 'D') {
+                if (firstcon)
+                    *firstcon = OB_FRAME_CONTEXT_ALLDESKTOPS;
+                if ((self->desk_on = is_button_present(self, lc, i))) {
+                    self->label_width -= bwidth;
+                    if (i > 0)
+                        self->desk_x = x;
+                    x += i * bwidth;
+                    if (i < 0)
+                        self->desk_x = x;
+                }
+            }
+            else if (*lc == 'S') {
+                if (firstcon)
+                    *firstcon = OB_FRAME_CONTEXT_SHADE;
+                if ((self->shade_on = is_button_present(self, lc, i))) {
+                    self->label_width -= bwidth;
+                    if (i > 0)
+                        self->shade_x = x;
+                    x += i * bwidth;
+                    if (i < 0)
+                        self->shade_x = x;
+                }
+            }
+            else if (*lc == 'I') {
+                if (firstcon)
+                    *firstcon = OB_FRAME_CONTEXT_ICONIFY;
+                if ((self->iconify_on = is_button_present(self, lc, i))) {
+                    self->label_width -= bwidth;
+                    if (i > 0)
+                        self->iconify_x = x;
+                    x += i * bwidth;
+                    if (i < 0)
+                        self->iconify_x = x;
+                }
+            }
+            else if (*lc == 'M') {
+                if (firstcon)
+                    *firstcon = OB_FRAME_CONTEXT_MAXIMIZE;
+                if ((self->max_on = is_button_present(self, lc, i))) {
+                    self->label_width -= bwidth;
+                    if (i > 0)
+                        self->max_x = x;
+                    x += i * bwidth;
+                    if (i < 0)
+                        self->max_x = x;
+                }
+            }
+            else if (*lc == 'C') {
+                if (firstcon)
+                    *firstcon = OB_FRAME_CONTEXT_CLOSE;
+                if ((self->close_on = is_button_present(self, lc, i))) {
+                    self->label_width -= bwidth;
+                    if (i > 0)
+                        self->close_x = x;
+                    x += i * bwidth;
+                    if (i < 0)
+                        self->close_x = x;
+                }
+            }
+            else
+                continue; /* don't set firstcon */
+            firstcon = NULL;
+        }
+    }
+
+    /* position and map the elements */
+    if (self->icon_on) {
+        XMapWindow(plugin.ob_display, self->icon);
+        XMoveWindow(plugin.ob_display, self->icon, self->icon_x,
+                theme_config.paddingy);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->icon);
+
+    if (self->desk_on) {
+        XMapWindow(plugin.ob_display, self->desk);
+        XMoveWindow(plugin.ob_display, self->desk, self->desk_x,
+                theme_config.paddingy + 1);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->desk);
+
+    if (self->shade_on) {
+        XMapWindow(plugin.ob_display, self->shade);
+        XMoveWindow(plugin.ob_display, self->shade, self->shade_x,
+                theme_config.paddingy + 1);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->shade);
+
+    if (self->iconify_on) {
+        XMapWindow(plugin.ob_display, self->iconify);
+        XMoveWindow(plugin.ob_display, self->iconify, self->iconify_x,
+                theme_config.paddingy + 1);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->iconify);
+
+    if (self->max_on) {
+        XMapWindow(plugin.ob_display, self->max);
+        XMoveWindow(plugin.ob_display, self->max, self->max_x,
+                theme_config.paddingy + 1);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->max);
+
+    if (self->close_on) {
+        XMapWindow(plugin.ob_display, self->close);
+        XMoveWindow(plugin.ob_display, self->close, self->close_x,
+                theme_config.paddingy + 1);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->close);
+
+    if (self->label_on) {
+        self->label_width = MAX(1, self->label_width); /* no lower than 1 */
+        XMapWindow(plugin.ob_display, self->label);
+        XMoveWindow(plugin.ob_display, self->label, self->label_x,
+                theme_config.paddingy);
+    }
+    else
+        XUnmapWindow(plugin.ob_display, self->label);
 }
 
 ObFramePlugin plugin = { 0, //gpointer handler;
-		"libdefault.la", //gchar * filename;
-		"Default", //gchar * name;
-		init, //gint (*init) (Display * display, gint screen);
-		0, frame_new, //gpointer (*frame_new) (struct _ObClient *c);
-		frame_free, //void (*frame_free) (gpointer self);
-		frame_show, //void (*frame_show) (gpointer self);
-		frame_hide, //void (*frame_hide) (gpointer self);
-		frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
-		frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
-		frame_grab, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
-		frame_ungrab, frame_context, //void (*frame_adjust_state) (gpointer self);
-		frame_set_is_visible, frame_set_is_focus, frame_set_is_max_vert,
-				frame_set_is_max_horz, frame_set_is_shaded,
-
-		frame_flash_start, frame_flash_stop, frame_begin_iconify_animation,
-				frame_end_iconify_animation, frame_iconify_animating,
-
-		frame_set_decorations,
-		/* This give the window area */
-		frame_get_window_area, frame_set_client_area,
-		/* Draw the frame */
-		frame_update_layout, frame_update_skin,
-
-		frame_set_hover_flag, frame_set_press_flag,
-
-		frame_get_window,
-
-		frame_get_size, frame_get_decorations,
-
-		frame_is_visible, frame_is_max_horz, frame_is_max_vert,
-
-		load_theme_config,
-
-		/* This fields are fill by openbox. */
-		0, //Display * ob_display;
-		0, //gint ob_screen;
-		0, //RrInstance *ob_rr_inst;
-		//     0, //RrTheme    *ob_rr_theme;
-				0, //gboolean config_theme_keepborder;
-		0, //struct _ObClient *focus_cycle_target;
-		0, //gchar *config_title_layout;
-		FALSE, //gboolean moveresize_in_progress;
-		0, //struct _ObMainLoop *ob_main_loop;
+        "libdefault.la", //gchar * filename;
+        "Default", //gchar * name;
+        init, //gint (*init) (Display * display, gint screen);
+        0, frame_new, //gpointer (*frame_new) (struct _ObClient *c);
+        frame_free, //void (*frame_free) (gpointer self);
+        frame_show, //void (*frame_show) (gpointer self);
+        frame_hide, //void (*frame_hide) (gpointer self);
+        frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
+        frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
+        frame_grab, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
+        frame_ungrab, frame_context, //void (*frame_adjust_state) (gpointer self);
+        frame_set_is_visible, frame_set_is_focus, frame_set_is_max_vert,
+                frame_set_is_max_horz, frame_set_is_shaded,
+
+        frame_flash_start, frame_flash_stop, frame_begin_iconify_animation,
+                frame_end_iconify_animation, frame_iconify_animating,
+
+        frame_set_decorations,
+        /* This give the window area */
+        frame_get_window_area, frame_set_client_area,
+        /* Draw the frame */
+        frame_update_layout, frame_update_skin,
+
+        frame_set_hover_flag, frame_set_press_flag,
+
+        frame_get_window,
+
+        frame_get_size, frame_get_decorations,
+
+        frame_is_visible, frame_is_max_horz, frame_is_max_vert,
+
+        load_theme_config,
+
+        /* This fields are fill by openbox. */
+        0, //Display * ob_display;
+        0, //gint ob_screen;
+        0, //RrInstance *ob_rr_inst;
+        //     0, //RrTheme    *ob_rr_theme;
+                0, //gboolean config_theme_keepborder;
+        0, //struct _ObClient *focus_cycle_target;
+        0, //gchar *config_title_layout;
+        FALSE, //gboolean moveresize_in_progress;
+        0, //struct _ObMainLoop *ob_main_loop;
 };
 
-ObFramePlugin * get_info() {
-	return &plugin;
+ObFramePlugin * get_info()
+{
+    return &plugin;
 }
diff --git a/engines/default/plugin.h b/engines/default/plugin.h
index 25db616..b2c3a7d 100644
--- a/engines/default/plugin.h
+++ b/engines/default/plugin.h
@@ -25,7 +25,7 @@
 ObFrameThemeConfig theme_config;
 
 struct _ObDefaultFrame
-  {
+{
     /* PUBLIC : */
 
     /* PRIVATE: */
@@ -151,7 +151,7 @@ struct _ObDefaultFrame
 
     GTimeVal iconify_animation_end;
 
-  };
+};
 
 typedef struct _ObDefaultFrame ObDefaultFrame;
 
@@ -169,13 +169,13 @@ void frame_ungrab(gpointer self, GHashTable *);
 
 ObFrameContext frame_context(gpointer, Window, gint, gint);
 
-void frame_set_is_visible (gpointer, gboolean);
-void frame_set_is_focus (gpointer, gboolean);
-void frame_set_is_max_vert (gpointer, gboolean);
-void frame_set_is_max_horz (gpointer, gboolean);
-void frame_set_is_shaded (gpointer, gboolean);
+void frame_set_is_visible(gpointer, gboolean);
+void frame_set_is_focus(gpointer, gboolean);
+void frame_set_is_max_vert(gpointer, gboolean);
+void frame_set_is_max_horz(gpointer, gboolean);
+void frame_set_is_shaded(gpointer, gboolean);
 
-void frame_update_layout (gpointer, gboolean, gboolean);
+void frame_update_layout(gpointer, gboolean, gboolean);
 void frame_adjust_client_area(gpointer self);
 void frame_adjust_state(gpointer self);
 void frame_adjust_focus(gpointer self, gboolean hilite);
@@ -183,10 +183,9 @@ void frame_adjust_title(gpointer self);
 void frame_adjust_icon(gpointer self);
 
 static gulong frame_animate_iconify_time_left(gpointer _self,
-    const GTimeVal *now);
+        const GTimeVal *now);
 
-ObFrameContext
-    frame_context(gpointer, Window win, gint x, gint y);
+ObFrameContext frame_context(gpointer, Window win, gint x, gint y);
 //void frame_client_gravity(gpointer self, gint *x, gint *y);
 //void frame_frame_gravity(gpointer self, gint *x, gint *y);
 //void frame_rect_to_frame(gpointer self, Rect *r);
@@ -200,15 +199,15 @@ gboolean frame_iconify_animating(gpointer _self);
 void frame_set_hover_flag(gpointer, ObFrameButton);
 void frame_set_press_flag(gpointer, ObFrameButton);
 
-Window frame_get_window (gpointer);
+Window frame_get_window(gpointer);
 
-Strut frame_get_size (gpointer self);
-Rect frame_get_area (gpointer self);
-gint frame_get_decorations (gpointer self);
+Strut frame_get_size(gpointer self);
+Rect frame_get_area(gpointer self);
+gint frame_get_decorations(gpointer self);
 
-gboolean frame_is_visible (gpointer self);
-gboolean frame_is_max_horz (gpointer self);
-gboolean frame_is_max_vert (gpointer self);
+gboolean frame_is_visible(gpointer self);
+gboolean frame_is_max_horz(gpointer self);
+gboolean frame_is_max_vert(gpointer self);
 
 void flash_done(gpointer data);
 gboolean flash_timeout(gpointer data);
diff --git a/engines/default/render.c b/engines/default/render.c
index 1b43f30..43fe0de 100644
--- a/engines/default/render.c
+++ b/engines/default/render.c
@@ -1,21 +1,21 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
-   frame_default_render.c for the Openbox window manager
-   Copyright (c) 2006        Mikael Magnusson
-   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
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   See the COPYING file for a copy of the GNU General Public License.
-*/
+ frame_default_render.c for the Openbox window manager
+ Copyright (c) 2006        Mikael Magnusson
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ See the COPYING file for a copy of the GNU General Public License.
+ */
 #include "render.h"
 #include "plugin.h"
 
@@ -33,7 +33,7 @@ static void framerender_desk(ObDefaultFrame *self, RrAppearance *a);
 static void framerender_shade(ObDefaultFrame *self, RrAppearance *a);
 static void framerender_close(ObDefaultFrame *self, RrAppearance *a);
 
-void frame_update_skin (gpointer _self)
+void frame_update_skin(gpointer _self)
 {
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     if (plugin.frame_iconify_animating(self))
@@ -44,9 +44,8 @@ void frame_update_skin (gpointer _self)
     {
         gulong px;
 
-        px = (self->focused ?
-              RrColorPixel(theme_config.cb_focused_color) :
-              RrColorPixel(theme_config.cb_unfocused_color));
+        px = (self->focused ? RrColorPixel(theme_config.cb_focused_color)
+                : RrColorPixel(theme_config.cb_unfocused_color));
 
         XSetWindowBackground(plugin.ob_display, self->backback, px);
         XClearWindow(plugin.ob_display, self->backback);
@@ -67,9 +66,9 @@ void frame_update_skin (gpointer _self)
         XSetWindowBackground(plugin.ob_display, self->innerbrb, px);
         XClearWindow(plugin.ob_display, self->innerbrb);
 
-        px = (self->focused ?
-              RrColorPixel(theme_config.frame_focused_border_color) :
-              RrColorPixel(theme_config.frame_unfocused_border_color));
+        px
+                = (self->focused ? RrColorPixel(theme_config.frame_focused_border_color)
+                        : RrColorPixel(theme_config.frame_unfocused_border_color));
 
         XSetWindowBackground(plugin.ob_display, self->left, px);
         XClearWindow(plugin.ob_display, self->left);
@@ -112,9 +111,9 @@ void frame_update_skin (gpointer _self)
 
         /* don't use the separator color for shaded windows */
         if (!self->shaded)
-            px = (self->focused ?
-                  RrColorPixel(theme_config.title_separator_focused_color) :
-                  RrColorPixel(theme_config.title_separator_unfocused_color));
+            px
+                    = (self->focused ? RrColorPixel(theme_config.title_separator_focused_color)
+                            : RrColorPixel(theme_config.title_separator_unfocused_color));
 
         XSetWindowBackground(plugin.ob_display, self->titlebottom, px);
         XClearWindow(plugin.ob_display, self->titlebottom);
@@ -127,117 +126,92 @@ void frame_update_skin (gpointer _self)
             t = self->a_focused_title;
             l = self->a_focused_label;
 
-            m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
-			theme_config.a_disabled_focused_max :
-                 (self->max_vert || self->max_horz ?
-                  (self->press_flag == OB_BUTTON_MAX ?
-				  theme_config.a_toggled_focused_pressed_max :
-                   (self->hover_flag == OB_BUTTON_MAX ?
-				   theme_config.a_toggled_hover_focused_max :
-                   theme_config.a_toggled_focused_unpressed_max)) :
-                  (self->press_flag == OB_BUTTON_MAX ?
-				  theme_config.a_focused_pressed_max :
-                   (self->hover_flag == OB_BUTTON_MAX ?
-				   theme_config.a_hover_focused_max :
-                   theme_config.a_focused_unpressed_max))));
+            m
+                    = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? theme_config.a_disabled_focused_max
+                            : (self->max_vert || self->max_horz ? (self->press_flag
+                                    == OB_BUTTON_MAX ? theme_config.a_toggled_focused_pressed_max
+                                    : (self->hover_flag == OB_BUTTON_MAX ? theme_config.a_toggled_hover_focused_max
+                                            : theme_config.a_toggled_focused_unpressed_max))
+                                    : (self->press_flag == OB_BUTTON_MAX ? theme_config.a_focused_pressed_max
+                                            : (self->hover_flag
+                                                    == OB_BUTTON_MAX ? theme_config.a_hover_focused_max
+                                                    : theme_config.a_focused_unpressed_max))));
             n = self->a_icon;
-            i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
-			theme_config.a_disabled_focused_iconify :
-                 (self->press_flag == OB_BUTTON_ICONIFY ?
-				 theme_config.a_focused_pressed_iconify :
-                  (self->hover_flag == OB_BUTTON_ICONIFY ?
-				  theme_config.a_hover_focused_iconify :
-                  theme_config.a_focused_unpressed_iconify)));
-            d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
-			theme_config.a_disabled_focused_desk :
-                 (self->client->desktop == DESKTOP_ALL ?
-                  (self->press_flag == OB_BUTTON_DESK ?
-				  theme_config.a_toggled_focused_pressed_desk :
-                   (self->hover_flag == OB_BUTTON_DESK ?
-				   theme_config.a_toggled_hover_focused_desk :
-                   theme_config.a_toggled_focused_unpressed_desk)) :
-                  (self->press_flag == OB_BUTTON_DESK ?
-				  theme_config.a_focused_pressed_desk :
-                   (self->hover_flag == OB_BUTTON_DESK ?
-				   theme_config.a_hover_focused_desk :
-                   theme_config.a_focused_unpressed_desk))));
-            s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
-			theme_config.a_disabled_focused_shade :
-                 (self->shaded ?
-                  (self->press_flag == OB_BUTTON_SHADE ?
-				  theme_config.a_toggled_focused_pressed_shade :
-                   (self->hover_flag == OB_BUTTON_SHADE ?
-				   theme_config.a_toggled_hover_focused_shade :
-                   theme_config.a_toggled_focused_unpressed_shade)) :
-                  (self->press_flag == OB_BUTTON_SHADE ?
-				  theme_config.a_focused_pressed_shade :
-                   (self->hover_flag == OB_BUTTON_SHADE ?
-				   theme_config.a_hover_focused_shade :
-                   theme_config.a_focused_unpressed_shade))));
-            c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
-			theme_config.a_disabled_focused_close :
-                 (self->press_flag == OB_BUTTON_CLOSE ?
-				 theme_config.a_focused_pressed_close :
-                  (self->hover_flag == OB_BUTTON_CLOSE ?
-				  theme_config.a_hover_focused_close :
-                  theme_config.a_focused_unpressed_close)));
-        } else {
+            i
+                    = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? theme_config.a_disabled_focused_iconify
+                            : (self->press_flag == OB_BUTTON_ICONIFY ? theme_config.a_focused_pressed_iconify
+                                    : (self->hover_flag == OB_BUTTON_ICONIFY ? theme_config.a_hover_focused_iconify
+                                            : theme_config.a_focused_unpressed_iconify)));
+            d
+                    = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ? theme_config.a_disabled_focused_desk
+                            : (self->client->desktop == DESKTOP_ALL ? (self->press_flag
+                                    == OB_BUTTON_DESK ? theme_config.a_toggled_focused_pressed_desk
+                                    : (self->hover_flag == OB_BUTTON_DESK ? theme_config.a_toggled_hover_focused_desk
+                                            : theme_config.a_toggled_focused_unpressed_desk))
+                                    : (self->press_flag == OB_BUTTON_DESK ? theme_config.a_focused_pressed_desk
+                                            : (self->hover_flag
+                                                    == OB_BUTTON_DESK ? theme_config.a_hover_focused_desk
+                                                    : theme_config.a_focused_unpressed_desk))));
+            s
+                    = (!(self->decorations & OB_FRAME_DECOR_SHADE) ? theme_config.a_disabled_focused_shade
+                            : (self->shaded ? (self->press_flag
+                                    == OB_BUTTON_SHADE ? theme_config.a_toggled_focused_pressed_shade
+                                    : (self->hover_flag == OB_BUTTON_SHADE ? theme_config.a_toggled_hover_focused_shade
+                                            : theme_config.a_toggled_focused_unpressed_shade))
+                                    : (self->press_flag == OB_BUTTON_SHADE ? theme_config.a_focused_pressed_shade
+                                            : (self->hover_flag
+                                                    == OB_BUTTON_SHADE ? theme_config.a_hover_focused_shade
+                                                    : theme_config.a_focused_unpressed_shade))));
+            c
+                    = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ? theme_config.a_disabled_focused_close
+                            : (self->press_flag == OB_BUTTON_CLOSE ? theme_config.a_focused_pressed_close
+                                    : (self->hover_flag == OB_BUTTON_CLOSE ? theme_config.a_hover_focused_close
+                                            : theme_config.a_focused_unpressed_close)));
+        }
+        else {
             t = self->a_unfocused_title;
             l = self->a_unfocused_label;
-            m = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ?
-			theme_config.a_disabled_unfocused_max :
-                 (self->max_vert || self->max_horz ?
-                  (self->press_flag == OB_BUTTON_MAX ?
-				  theme_config.a_toggled_unfocused_pressed_max :
-                   (self->hover_flag == OB_BUTTON_MAX ?
-				   theme_config.a_toggled_hover_unfocused_max :
-                   theme_config.a_toggled_unfocused_unpressed_max)) :
-                  (self->press_flag == OB_BUTTON_MAX ?
-				  theme_config.a_unfocused_pressed_max :
-                   (self->hover_flag == OB_BUTTON_MAX ?
-				   theme_config.a_hover_unfocused_max :
-                   theme_config.a_unfocused_unpressed_max))));
+            m
+                    = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? theme_config.a_disabled_unfocused_max
+                            : (self->max_vert || self->max_horz ? (self->press_flag
+                                    == OB_BUTTON_MAX ? theme_config.a_toggled_unfocused_pressed_max
+                                    : (self->hover_flag == OB_BUTTON_MAX ? theme_config.a_toggled_hover_unfocused_max
+                                            : theme_config.a_toggled_unfocused_unpressed_max))
+                                    : (self->press_flag == OB_BUTTON_MAX ? theme_config.a_unfocused_pressed_max
+                                            : (self->hover_flag
+                                                    == OB_BUTTON_MAX ? theme_config.a_hover_unfocused_max
+                                                    : theme_config.a_unfocused_unpressed_max))));
             n = self->a_icon;
-            i = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ?
-			theme_config.a_disabled_unfocused_iconify :
-                 (self->press_flag == OB_BUTTON_ICONIFY ?
-				 theme_config.a_unfocused_pressed_iconify :
-                  (self->hover_flag == OB_BUTTON_ICONIFY ?
-				  theme_config.a_hover_unfocused_iconify :
-                  theme_config.a_unfocused_unpressed_iconify)));
-            d = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ?
-			theme_config.a_disabled_unfocused_desk :
-                 (self->client->desktop == DESKTOP_ALL ?
-                  (self->press_flag == OB_BUTTON_DESK ?
-				  theme_config.a_toggled_unfocused_pressed_desk :
-                   (self->hover_flag == OB_BUTTON_DESK ?
-				   theme_config.a_toggled_hover_unfocused_desk :
-                   theme_config.a_toggled_unfocused_unpressed_desk)) :
-                  (self->hover_flag == OB_BUTTON_DESK ?
-				  theme_config.a_unfocused_pressed_desk :
-                   (self->hover_flag == OB_BUTTON_DESK ?
-				   theme_config.a_hover_unfocused_desk :
-                   theme_config.a_unfocused_unpressed_desk))));
-            s = (!(self->decorations & OB_FRAME_DECOR_SHADE) ?
-			theme_config.a_disabled_unfocused_shade :
-                 (self->shaded ?
-                  (self->press_flag == OB_BUTTON_SHADE ?
-				  theme_config.a_toggled_unfocused_pressed_shade :
-                   (self->hover_flag == OB_BUTTON_SHADE ?
-				   theme_config.a_toggled_hover_unfocused_shade :
-                   theme_config.a_toggled_unfocused_unpressed_shade)) :
-                  (self->press_flag == OB_BUTTON_SHADE ?
-				  theme_config.a_unfocused_pressed_shade :
-                   (self->hover_flag == OB_BUTTON_SHADE ?
-				   theme_config.a_hover_unfocused_shade :
-                   theme_config.a_unfocused_unpressed_shade))));
-            c = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ?
-			theme_config.a_disabled_unfocused_close :
-                 (self->press_flag == OB_BUTTON_CLOSE ?
-				 theme_config.a_unfocused_pressed_close :
-                  (self->hover_flag == OB_BUTTON_CLOSE ?
-				  theme_config.a_hover_unfocused_close :
-                  theme_config.a_unfocused_unpressed_close)));
+            i
+                    = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? theme_config.a_disabled_unfocused_iconify
+                            : (self->press_flag == OB_BUTTON_ICONIFY ? theme_config.a_unfocused_pressed_iconify
+                                    : (self->hover_flag == OB_BUTTON_ICONIFY ? theme_config.a_hover_unfocused_iconify
+                                            : theme_config.a_unfocused_unpressed_iconify)));
+            d
+                    = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ? theme_config.a_disabled_unfocused_desk
+                            : (self->client->desktop == DESKTOP_ALL ? (self->press_flag
+                                    == OB_BUTTON_DESK ? theme_config.a_toggled_unfocused_pressed_desk
+                                    : (self->hover_flag == OB_BUTTON_DESK ? theme_config.a_toggled_hover_unfocused_desk
+                                            : theme_config.a_toggled_unfocused_unpressed_desk))
+                                    : (self->hover_flag == OB_BUTTON_DESK ? theme_config.a_unfocused_pressed_desk
+                                            : (self->hover_flag
+                                                    == OB_BUTTON_DESK ? theme_config.a_hover_unfocused_desk
+                                                    : theme_config.a_unfocused_unpressed_desk))));
+            s
+                    = (!(self->decorations & OB_FRAME_DECOR_SHADE) ? theme_config.a_disabled_unfocused_shade
+                            : (self->shaded ? (self->press_flag
+                                    == OB_BUTTON_SHADE ? theme_config.a_toggled_unfocused_pressed_shade
+                                    : (self->hover_flag == OB_BUTTON_SHADE ? theme_config.a_toggled_hover_unfocused_shade
+                                            : theme_config.a_toggled_unfocused_unpressed_shade))
+                                    : (self->press_flag == OB_BUTTON_SHADE ? theme_config.a_unfocused_pressed_shade
+                                            : (self->hover_flag
+                                                    == OB_BUTTON_SHADE ? theme_config.a_hover_unfocused_shade
+                                                    : theme_config.a_unfocused_unpressed_shade))));
+            c
+                    = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ? theme_config.a_disabled_unfocused_close
+                            : (self->press_flag == OB_BUTTON_CLOSE ? theme_config.a_unfocused_pressed_close
+                                    : (self->hover_flag == OB_BUTTON_CLOSE ? theme_config.a_hover_unfocused_close
+                                            : theme_config.a_unfocused_unpressed_close)));
         }
         clear = theme_config.a_clear;
 
@@ -248,30 +222,29 @@ void frame_update_skin (gpointer _self)
 
         clear->surface.parentx = theme_config.grip_width;
 
-        RrPaint(clear, self->topresize,
-                self->width - theme_config.grip_width * 2,
-                theme_config.paddingy + 1);
+        RrPaint(clear, self->topresize, self->width - theme_config.grip_width
+                * 2, theme_config.paddingy + 1);
 
         clear->surface.parentx = 0;
 
         if (theme_config.grip_width > 0)
-            RrPaint(clear, self->tltresize,
-			theme_config.grip_width, theme_config.paddingy + 1);
+            RrPaint(clear, self->tltresize, theme_config.grip_width,
+                    theme_config.paddingy + 1);
         if (theme_config.title_height > 0)
-            RrPaint(clear, self->tllresize,
-			theme_config.paddingx + 1, theme_config.title_height);
+            RrPaint(clear, self->tllresize, theme_config.paddingx + 1,
+                    theme_config.title_height);
 
         clear->surface.parentx = self->width - theme_config.grip_width;
 
         if (theme_config.grip_width > 0)
-            RrPaint(clear, self->trtresize,
-			theme_config.grip_width, theme_config.paddingy + 1);
+            RrPaint(clear, self->trtresize, theme_config.grip_width,
+                    theme_config.paddingy + 1);
 
         clear->surface.parentx = self->width - (theme_config.paddingx + 1);
 
         if (theme_config.title_height > 0)
-            RrPaint(clear, self->trrresize,
-			theme_config.paddingx + 1, theme_config.title_height);
+            RrPaint(clear, self->trrresize, theme_config.paddingx + 1,
+                    theme_config.title_height);
 
         /* set parents for any parent relative guys */
         l->surface.parent = t;
@@ -311,19 +284,17 @@ void frame_update_skin (gpointer _self)
         framerender_close(self, c);
     }
 
-    if (self->decorations & OB_FRAME_DECOR_HANDLE &&
-		theme_config.handle_height > 0)
-    {
+    if (self->decorations & OB_FRAME_DECOR_HANDLE && theme_config.handle_height
+            > 0) {
         RrAppearance *h, *g;
 
-        h = (self->focused ?
-             self->a_focused_handle : self->a_unfocused_handle);
+        h = (self->focused ? self->a_focused_handle : self->a_unfocused_handle);
 
         RrPaint(h, self->handle, self->width, theme_config.handle_height);
 
         if (self->decorations & OB_FRAME_DECOR_GRIPS) {
-            g = (self->focused ?
-			theme_config.a_focused_grip : theme_config.a_unfocused_grip);
+            g = (self->focused ? theme_config.a_focused_grip
+                    : theme_config.a_unfocused_grip);
 
             if (g->surface.grad == RR_SURFACE_PARENTREL)
                 g->surface.parent = h;
@@ -331,14 +302,14 @@ void frame_update_skin (gpointer _self)
             g->surface.parentx = 0;
             g->surface.parenty = 0;
 
-            RrPaint(g, self->lgrip,
-			theme_config.grip_width, theme_config.handle_height);
+            RrPaint(g, self->lgrip, theme_config.grip_width,
+                    theme_config.handle_height);
 
             g->surface.parentx = self->width - theme_config.grip_width;
             g->surface.parenty = 0;
 
-            RrPaint(g, self->rgrip,
-			theme_config.grip_width, theme_config.handle_height);
+            RrPaint(g, self->rgrip, theme_config.grip_width,
+                    theme_config.handle_height);
         }
     }
 
@@ -347,7 +318,8 @@ void frame_update_skin (gpointer _self)
 
 static void framerender_label(ObDefaultFrame *self, RrAppearance *a)
 {
-    if (!self->label_on) 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, theme_config.label_height);
@@ -357,53 +329,57 @@ static void framerender_icon(ObDefaultFrame *self, RrAppearance *a)
 {
     const ObClientIcon *icon;
 
-    if (!self->icon_on) return;
+    if (!self->icon_on)
+        return;
 
-    icon = client_icon(self->client,
-		theme_config.button_size + 2,
-		theme_config.button_size + 2);
+    icon = client_icon(self->client, theme_config.button_size + 2,
+            theme_config.button_size + 2);
     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
+    }
+    else
         a->texture[0].type = RR_TEXTURE_NONE;
 
-    RrPaint(a, self->icon,
-		theme_config.button_size + 2, theme_config.button_size + 2);
+    RrPaint(a, self->icon, theme_config.button_size + 2,
+            theme_config.button_size + 2);
 }
 
 static void framerender_max(ObDefaultFrame *self, RrAppearance *a)
 {
-    if (!self->max_on) return;
+    if (!self->max_on)
+        return;
     RrPaint(a, self->max, theme_config.button_size, theme_config.button_size);
 }
 
 static void framerender_iconify(ObDefaultFrame *self, RrAppearance *a)
 {
-    if (!self->iconify_on) return;
-    RrPaint(a, self->iconify,
-		theme_config.button_size, theme_config.button_size);
+    if (!self->iconify_on)
+        return;
+    RrPaint(a, self->iconify, theme_config.button_size,
+            theme_config.button_size);
 }
 
 static void framerender_desk(ObDefaultFrame *self, RrAppearance *a)
 {
-    if (!self->desk_on) return;
+    if (!self->desk_on)
+        return;
     RrPaint(a, self->desk, theme_config.button_size, theme_config.button_size);
 }
 
 static void framerender_shade(ObDefaultFrame *self, RrAppearance *a)
 {
-    if (!self->shade_on) return;
-    RrPaint(a, self->shade,
-		theme_config.button_size, theme_config.button_size);
+    if (!self->shade_on)
+        return;
+    RrPaint(a, self->shade, theme_config.button_size, theme_config.button_size);
 }
 
 static void framerender_close(ObDefaultFrame *self, RrAppearance *a)
 {
-    if (!self->close_on) return;
-    RrPaint(a, self->close,
-		theme_config.button_size, theme_config.button_size);
+    if (!self->close_on)
+        return;
+    RrPaint(a, self->close, theme_config.button_size, theme_config.button_size);
 }
diff --git a/engines/default/render.h b/engines/default/render.h
index 9fcce78..29bdc6a 100644
--- a/engines/default/render.h
+++ b/engines/default/render.h
@@ -1,26 +1,26 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
-   frame_default_render.h for the Openbox window manager
-   Copyright (c) 2003-2007   Dana Jansens
+ frame_default_render.h for the Openbox window manager
+ 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
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
 
-   See the COPYING file for a copy of the GNU General Public License.
-*/
+ See the COPYING file for a copy of the GNU General Public License.
+ */
 
 #ifndef FRAME_DEFAULT_RENDER_H_
 #define FRAME_DEFAULT_RENDER_H_
 
 #include "plugin.h"
 
-void frame_update_skin (gpointer self);
+void frame_update_skin(gpointer self);
 
 #endif
diff --git a/engines/minimal/frame_minimal_config.c b/engines/minimal/frame_minimal_config.c
index 0fab2e5..283df34 100644
--- a/engines/minimal/frame_minimal_config.c
+++ b/engines/minimal/frame_minimal_config.c
@@ -37,20 +37,20 @@ static XrmDatabase loaddb(const gchar *name, gchar **path);
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value);
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value);
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value);
+        const gchar *rname, RrColor **value);
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value);
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans);
+        const gchar *rname, RrAppearance *value, gboolean allow_trans);
 static int parse_inline_number(const char *p);
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data);
 static void set_default_appearance(RrAppearance *a);
 
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font)
-  {
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font)
+{
     RrJustify winjust, mtitlejust;
     gchar *str;
     ObFrameThemeConfig * theme = &theme_config;
@@ -105,59 +105,54 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
     theme->osd_unhilite_fg = RrAppearanceNew(inst, 0);
 
     /* load the font stuff */
-    if (active_window_font)
-      {
+    if (active_window_font) {
         theme->win_font_focused = active_window_font;
         RrFontRef(active_window_font);
-      }
+    }
     else
-      theme->win_font_focused = RrFontOpenDefault(inst);
+        theme->win_font_focused = RrFontOpenDefault(inst);
 
-    if (inactive_window_font)
-      {
+    if (inactive_window_font) {
         theme->win_font_unfocused = inactive_window_font;
         RrFontRef(inactive_window_font);
-      }
+    }
     else
-      theme->win_font_unfocused = RrFontOpenDefault(inst);
+        theme->win_font_unfocused = RrFontOpenDefault(inst);
 
     winjust = RR_JUSTIFY_LEFT;
     str = "center";
     if (!g_ascii_strcasecmp(str, "right"))
-      winjust = RR_JUSTIFY_RIGHT;
+        winjust = RR_JUSTIFY_RIGHT;
     else if (!g_ascii_strcasecmp(str, "center"))
-      winjust = RR_JUSTIFY_CENTER;
+        winjust = RR_JUSTIFY_CENTER;
 
-    if (menu_title_font)
-      {
+    if (menu_title_font) {
         theme->menu_title_font = menu_title_font;
         RrFontRef(menu_title_font);
-      }
+    }
     else
-      theme->menu_title_font = RrFontOpenDefault(inst);
+        theme->menu_title_font = RrFontOpenDefault(inst);
 
     mtitlejust = RR_JUSTIFY_LEFT;
     str = "center";
     if (!g_ascii_strcasecmp(str, "right"))
-      mtitlejust = RR_JUSTIFY_RIGHT;
+        mtitlejust = RR_JUSTIFY_RIGHT;
     else if (!g_ascii_strcasecmp(str, "center"))
-      mtitlejust = RR_JUSTIFY_CENTER;
+        mtitlejust = RR_JUSTIFY_CENTER;
 
-    if (menu_item_font)
-      {
+    if (menu_item_font) {
         theme->menu_font = menu_item_font;
         RrFontRef(menu_item_font);
-      }
+    }
     else
-      theme->menu_font = RrFontOpenDefault(inst);
+        theme->menu_font = RrFontOpenDefault(inst);
 
-    if (osd_font)
-      {
+    if (osd_font) {
         theme->osd_font = osd_font;
         RrFontRef(osd_font);
-      }
+    }
     else
-      theme->osd_font = RrFontOpenDefault(inst);
+        theme->osd_font = RrFontOpenDefault(inst);
 
     /* load direct dimensions */
     theme->menu_overlap = 0;
@@ -176,493 +171,455 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
     theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0);
     /* title separator focused color inherits from focused boder color */
     theme->title_separator_focused_color = RrColorNew(inst,
-        theme->frame_focused_border_color->r,
-        theme->frame_focused_border_color->g,
-        theme->frame_focused_border_color->b);
+            theme->frame_focused_border_color->r,
+            theme->frame_focused_border_color->g,
+            theme->frame_focused_border_color->b);
     /* unfocused border color inherits from frame focused border color */
     theme->frame_unfocused_border_color = RrColorNew(inst,
-        theme->frame_focused_border_color->r,
-        theme->frame_focused_border_color->g,
-        theme->frame_focused_border_color->b);
+            theme->frame_focused_border_color->r,
+            theme->frame_focused_border_color->g,
+            theme->frame_focused_border_color->b);
     /* title separator unfocused color inherits from unfocused boder color */
     theme->title_separator_unfocused_color = RrColorNew(inst,
-        theme->frame_unfocused_border_color->r,
-        theme->frame_unfocused_border_color->g,
-        theme->frame_unfocused_border_color->b);
+            theme->frame_unfocused_border_color->r,
+            theme->frame_unfocused_border_color->g,
+            theme->frame_unfocused_border_color->b);
 
     /* menu border color inherits from frame focused border color */
     theme->menu_border_color = RrColorNew(inst,
-        theme->frame_focused_border_color->r,
-        theme->frame_focused_border_color->g,
-        theme->frame_focused_border_color->b);
+            theme->frame_focused_border_color->r,
+            theme->frame_focused_border_color->g,
+            theme->frame_focused_border_color->b);
     /* osd border color inherits from frame focused border color */
     theme->osd_border_color = RrColorNew(inst,
-        theme->frame_focused_border_color->r,
-        theme->frame_focused_border_color->g,
-        theme->frame_focused_border_color->b);
+            theme->frame_focused_border_color->r,
+            theme->frame_focused_border_color->g,
+            theme->frame_focused_border_color->b);
     theme->cb_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     theme->cb_unfocused_color = RrColorNew(inst, 0x44, 0x44, 0x44);
     theme->title_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     theme->osd_color = RrColorNew(inst, theme->title_focused_color->r,
-        theme->title_focused_color->g, theme->title_focused_color->b);
+            theme->title_focused_color->g, theme->title_focused_color->b);
     theme->title_unfocused_color = RrColorNew(inst, 0x44, 0x44, 0x44);
-    theme->titlebut_focused_unpressed_color = RrColorNew(inst, 0xff, 0xff, 0xff);
+    theme->titlebut_focused_unpressed_color
+            = RrColorNew(inst, 0xff, 0xff, 0xff);
     theme->titlebut_unfocused_unpressed_color = RrColorNew(inst, 0x44, 0x44,
-        0x44);
+            0x44);
     theme->titlebut_focused_pressed_color = RrColorNew(inst,
-        theme->titlebut_focused_unpressed_color->r,
-        theme->titlebut_focused_unpressed_color->g,
-        theme->titlebut_focused_unpressed_color->b);
+            theme->titlebut_focused_unpressed_color->r,
+            theme->titlebut_focused_unpressed_color->g,
+            theme->titlebut_focused_unpressed_color->b);
     theme->titlebut_unfocused_pressed_color = RrColorNew(inst,
-        theme->titlebut_unfocused_unpressed_color->r,
-        theme->titlebut_unfocused_unpressed_color->g,
-        theme->titlebut_unfocused_unpressed_color->b);
+            theme->titlebut_unfocused_unpressed_color->r,
+            theme->titlebut_unfocused_unpressed_color->g,
+            theme->titlebut_unfocused_unpressed_color->b);
     theme->titlebut_disabled_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     theme->titlebut_disabled_unfocused_color = RrColorNew(inst, 0, 0, 0);
     theme->titlebut_hover_focused_color = RrColorNew(inst,
-        theme->titlebut_focused_unpressed_color->r,
-        theme->titlebut_focused_unpressed_color->g,
-        theme->titlebut_focused_unpressed_color->b);
+            theme->titlebut_focused_unpressed_color->r,
+            theme->titlebut_focused_unpressed_color->g,
+            theme->titlebut_focused_unpressed_color->b);
     theme->titlebut_hover_unfocused_color = RrColorNew(inst,
-        theme->titlebut_unfocused_unpressed_color->r,
-        theme->titlebut_unfocused_unpressed_color->g,
-        theme->titlebut_unfocused_unpressed_color->b);
+            theme->titlebut_unfocused_unpressed_color->r,
+            theme->titlebut_unfocused_unpressed_color->g,
+            theme->titlebut_unfocused_unpressed_color->b);
     theme->titlebut_toggled_focused_unpressed_color = RrColorNew(inst,
-        theme->titlebut_focused_pressed_color->r,
-        theme->titlebut_focused_pressed_color->g,
-        theme->titlebut_focused_pressed_color->b);
+            theme->titlebut_focused_pressed_color->r,
+            theme->titlebut_focused_pressed_color->g,
+            theme->titlebut_focused_pressed_color->b);
     theme->titlebut_toggled_unfocused_unpressed_color = RrColorNew(inst,
-        theme->titlebut_unfocused_pressed_color->r,
-        theme->titlebut_unfocused_pressed_color->g,
-        theme->titlebut_unfocused_pressed_color->b);
+            theme->titlebut_unfocused_pressed_color->r,
+            theme->titlebut_unfocused_pressed_color->g,
+            theme->titlebut_unfocused_pressed_color->b);
     theme->titlebut_toggled_hover_focused_color = RrColorNew(inst,
-        theme->titlebut_toggled_focused_unpressed_color->r,
-        theme->titlebut_toggled_focused_unpressed_color->g,
-        theme->titlebut_toggled_focused_unpressed_color->b);
+            theme->titlebut_toggled_focused_unpressed_color->r,
+            theme->titlebut_toggled_focused_unpressed_color->g,
+            theme->titlebut_toggled_focused_unpressed_color->b);
     theme->titlebut_toggled_hover_unfocused_color = RrColorNew(inst,
-        theme->titlebut_toggled_unfocused_unpressed_color->r,
-        theme->titlebut_toggled_unfocused_unpressed_color->g,
-        theme->titlebut_toggled_unfocused_unpressed_color->b);
+            theme->titlebut_toggled_unfocused_unpressed_color->r,
+            theme->titlebut_toggled_unfocused_unpressed_color->g,
+            theme->titlebut_toggled_unfocused_unpressed_color->b);
     theme->titlebut_toggled_focused_pressed_color = RrColorNew(inst,
-        theme->titlebut_focused_pressed_color->r,
-        theme->titlebut_focused_pressed_color->g,
-        theme->titlebut_focused_pressed_color->b);
+            theme->titlebut_focused_pressed_color->r,
+            theme->titlebut_focused_pressed_color->g,
+            theme->titlebut_focused_pressed_color->b);
     theme->titlebut_toggled_unfocused_pressed_color = RrColorNew(inst,
-        theme->titlebut_unfocused_pressed_color->r,
-        theme->titlebut_unfocused_pressed_color->g,
-        theme->titlebut_unfocused_pressed_color->b);
+            theme->titlebut_unfocused_pressed_color->r,
+            theme->titlebut_unfocused_pressed_color->g,
+            theme->titlebut_unfocused_pressed_color->b);
     theme->menu_title_color = RrColorNew(inst, 0, 0, 0);
     theme->menu_color = RrColorNew(inst, 0xff, 0xff, 0xff);
     theme->menu_disabled_color = RrColorNew(inst, 0, 0, 0);
     theme->menu_disabled_selected_color = RrColorNew(inst,
-        theme->menu_disabled_color->r, theme->menu_disabled_color->g,
-        theme->menu_disabled_color->b);
+            theme->menu_disabled_color->r, theme->menu_disabled_color->g,
+            theme->menu_disabled_color->b);
     theme->menu_selected_color = RrColorNew(inst, 0, 0, 0);
 
     /* load the image masks */
 
     /* maximize button masks */
     userdef = TRUE;
-    if (!read_mask(inst, path, theme, "max.xbm", &theme->max_mask))
-      {
-        guchar data[] =
-          { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
+    if (!read_mask(inst, path, theme, "max.xbm", &theme->max_mask)) {
+        guchar data[] = { 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
         theme->max_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
         userdef = FALSE;
-      }
+    }
     if (!read_mask(inst, path, theme, "max_toggled.xbm",
-        &theme->max_toggled_mask))
-      {
+            &theme->max_toggled_mask)) {
         if (userdef)
-          theme->max_toggled_mask = RrPixmapMaskCopy(theme->max_mask);
-        else
-          {
-            guchar data[] =
-              { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
+            theme->max_toggled_mask = RrPixmapMaskCopy(theme->max_mask);
+        else {
+            guchar data[] = { 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
             theme->max_toggled_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-          }
-      }
+        }
+    }
 
-      theme->max_pressed_mask = RrPixmapMaskCopy(theme->max_mask);
-      theme->max_disabled_mask = RrPixmapMaskCopy(theme->max_mask);
-      theme->max_hover_mask = RrPixmapMaskCopy(theme->max_mask);
-      theme->max_toggled_pressed_mask
-          = RrPixmapMaskCopy(theme->max_toggled_mask);
-      theme->max_toggled_hover_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
+    theme->max_pressed_mask = RrPixmapMaskCopy(theme->max_mask);
+    theme->max_disabled_mask = RrPixmapMaskCopy(theme->max_mask);
+    theme->max_hover_mask = RrPixmapMaskCopy(theme->max_mask);
+    theme->max_toggled_pressed_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
+    theme->max_toggled_hover_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
 
     /* iconify button masks */
-    if (!read_mask(inst, path, theme, "iconify.xbm", &theme->iconify_mask))
-      {
-        guchar data[] =
-          { 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f };
+    if (!read_mask(inst, path, theme, "iconify.xbm", &theme->iconify_mask)) {
+        guchar data[] = { 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f };
         theme->iconify_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-      }
-      theme->iconify_pressed_mask = RrPixmapMaskCopy(theme->iconify_mask);
-      theme->iconify_disabled_mask = RrPixmapMaskCopy(theme->iconify_mask);
-      theme->iconify_hover_mask = RrPixmapMaskCopy(theme->iconify_mask);
+    }
+    theme->iconify_pressed_mask = RrPixmapMaskCopy(theme->iconify_mask);
+    theme->iconify_disabled_mask = RrPixmapMaskCopy(theme->iconify_mask);
+    theme->iconify_hover_mask = RrPixmapMaskCopy(theme->iconify_mask);
 
     /* all desktops button masks */
     userdef = TRUE;
-    if (!read_mask(inst, path, theme, "desk.xbm", &theme->desk_mask))
-      {
-        guchar data[] =
-          { 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 };
+    if (!read_mask(inst, path, theme, "desk.xbm", &theme->desk_mask)) {
+        guchar data[] = { 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 };
         theme->desk_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
         userdef = FALSE;
-      }
+    }
     if (!read_mask(inst, path, theme, "desk_toggled.xbm",
-        &theme->desk_toggled_mask))
-      {
+            &theme->desk_toggled_mask)) {
         if (userdef)
-          theme->desk_toggled_mask = RrPixmapMaskCopy(theme->desk_mask);
-        else
-          {
-            guchar data[] =
-              { 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
+            theme->desk_toggled_mask = RrPixmapMaskCopy(theme->desk_mask);
+        else {
+            guchar data[] = { 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
             theme->desk_toggled_mask
-                = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-          }
-      }
-      theme->desk_pressed_mask = RrPixmapMaskCopy(theme->desk_mask);
-      theme->desk_disabled_mask = RrPixmapMaskCopy(theme->desk_mask);
-      theme->desk_hover_mask = RrPixmapMaskCopy(theme->desk_mask);
-      theme->desk_toggled_pressed_mask
-          = RrPixmapMaskCopy(theme->desk_toggled_mask);
-      theme->desk_toggled_hover_mask
-          = RrPixmapMaskCopy(theme->desk_toggled_mask);
+                    = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
+        }
+    }
+    theme->desk_pressed_mask = RrPixmapMaskCopy(theme->desk_mask);
+    theme->desk_disabled_mask = RrPixmapMaskCopy(theme->desk_mask);
+    theme->desk_hover_mask = RrPixmapMaskCopy(theme->desk_mask);
+    theme->desk_toggled_pressed_mask
+            = RrPixmapMaskCopy(theme->desk_toggled_mask);
+    theme->desk_toggled_hover_mask = RrPixmapMaskCopy(theme->desk_toggled_mask);
 
     /* shade button masks */
-    if (!read_mask(inst, path, theme, "shade.xbm", &theme->shade_mask))
-      {
-        guchar data[] =
-          { 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00 };
+    if (!read_mask(inst, path, theme, "shade.xbm", &theme->shade_mask)) {
+        guchar data[] = { 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00 };
         theme->shade_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-      }
-      theme->shade_toggled_mask = RrPixmapMaskCopy(theme->shade_mask);
-      theme->shade_pressed_mask = RrPixmapMaskCopy(theme->shade_mask);
-      theme->shade_disabled_mask = RrPixmapMaskCopy(theme->shade_mask);
-      theme->shade_hover_mask = RrPixmapMaskCopy(theme->shade_mask);
-      theme->shade_toggled_pressed_mask
-          = RrPixmapMaskCopy(theme->shade_toggled_mask);
-      theme->shade_toggled_hover_mask
-          = RrPixmapMaskCopy(theme->shade_toggled_mask);
+    }
+    theme->shade_toggled_mask = RrPixmapMaskCopy(theme->shade_mask);
+    theme->shade_pressed_mask = RrPixmapMaskCopy(theme->shade_mask);
+    theme->shade_disabled_mask = RrPixmapMaskCopy(theme->shade_mask);
+    theme->shade_hover_mask = RrPixmapMaskCopy(theme->shade_mask);
+    theme->shade_toggled_pressed_mask
+            = RrPixmapMaskCopy(theme->shade_toggled_mask);
+    theme->shade_toggled_hover_mask
+            = RrPixmapMaskCopy(theme->shade_toggled_mask);
 
     /* close button masks */
-    if (!read_mask(inst, path, theme, "close.xbm", &theme->close_mask))
-      {
-        guchar data[] =
-          { 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 };
+    if (!read_mask(inst, path, theme, "close.xbm", &theme->close_mask)) {
+        guchar data[] = { 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 };
         theme->close_mask = RrPixmapMaskNew(inst, 6, 6, (gchar*)data);
-      }
-      theme->close_pressed_mask = RrPixmapMaskCopy(theme->close_mask);
-      theme->close_disabled_mask = RrPixmapMaskCopy(theme->close_mask);
-      theme->close_hover_mask = RrPixmapMaskCopy(theme->close_mask);
+    }
+    theme->close_pressed_mask = RrPixmapMaskCopy(theme->close_mask);
+    theme->close_disabled_mask = RrPixmapMaskCopy(theme->close_mask);
+    theme->close_hover_mask = RrPixmapMaskCopy(theme->close_mask);
 
     /* submenu bullet mask */
-    if (!read_mask(inst, path, theme, "bullet.xbm", &theme->menu_bullet_mask))
-      {
-        guchar data[] =
-          { 0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 };
+    if (!read_mask(inst, path, theme, "bullet.xbm", &theme->menu_bullet_mask)) {
+        guchar data[] = { 0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 };
         theme->menu_bullet_mask = RrPixmapMaskNew(inst, 4, 7, (gchar*)data);
-      }
+    }
 
     /* setup the default window icon */
     theme->def_win_icon = read_c_image(OB_DEFAULT_ICON_WIDTH,
-        OB_DEFAULT_ICON_HEIGHT, OB_DEFAULT_ICON_pixel_data);
+            OB_DEFAULT_ICON_HEIGHT, OB_DEFAULT_ICON_pixel_data);
 
     /* the toggled hover mask = the toggled unpressed mask (i.e. no change) */
     theme->max_toggled_hover_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
     theme->desk_toggled_hover_mask = RrPixmapMaskCopy(theme->desk_toggled_mask);
     theme->shade_toggled_hover_mask
-        = RrPixmapMaskCopy(theme->shade_toggled_mask);
+            = RrPixmapMaskCopy(theme->shade_toggled_mask);
     /* the toggled pressed mask = the toggled unpressed mask (i.e. no change)*/
     theme->max_toggled_pressed_mask = RrPixmapMaskCopy(theme->max_toggled_mask);
     theme->desk_toggled_pressed_mask
-        = RrPixmapMaskCopy(theme->desk_toggled_mask);
+            = RrPixmapMaskCopy(theme->desk_toggled_mask);
     theme->shade_toggled_pressed_mask
-        = RrPixmapMaskCopy(theme->shade_toggled_mask);
+            = RrPixmapMaskCopy(theme->shade_toggled_mask);
 
     /* read the decoration textures */
-      set_default_appearance(theme->a_focused_title);
-      set_default_appearance(theme->a_unfocused_title);
-      set_default_appearance(theme->a_focused_label);
-      set_default_appearance(theme->a_unfocused_label);
-      set_default_appearance(theme->a_focused_handle);
-      set_default_appearance(theme->a_unfocused_handle);
-      set_default_appearance(theme->a_focused_grip);
-      set_default_appearance(theme->a_unfocused_grip);
-      set_default_appearance(theme->a_menu);
-      set_default_appearance(theme->a_menu_title);
-      set_default_appearance(theme->a_menu_selected);
+    set_default_appearance(theme->a_focused_title);
+    set_default_appearance(theme->a_unfocused_title);
+    set_default_appearance(theme->a_focused_label);
+    set_default_appearance(theme->a_unfocused_label);
+    set_default_appearance(theme->a_focused_handle);
+    set_default_appearance(theme->a_unfocused_handle);
+    set_default_appearance(theme->a_focused_grip);
+    set_default_appearance(theme->a_unfocused_grip);
+    set_default_appearance(theme->a_menu);
+    set_default_appearance(theme->a_menu_title);
+    set_default_appearance(theme->a_menu_selected);
     theme->a_menu_disabled_selected = RrAppearanceCopy(theme->a_menu_selected);
 
     /* read appearances for non-decorations (on-screen-display) */
-    if (!read_appearance(db, inst, "osd.bg", theme->osd_hilite_bg, FALSE))
-      {
+    if (!read_appearance(db, inst, "osd.bg", theme->osd_hilite_bg, FALSE)) {
         RrAppearanceFree(theme->osd_hilite_bg);
         theme->osd_hilite_bg = RrAppearanceCopy(theme->a_focused_title);
-      }
+    }
     if (!read_appearance(db, inst, "osd.label.bg", theme->osd_hilite_label,
-        TRUE))
-      {
+            TRUE)) {
         RrAppearanceFree(theme->osd_hilite_label);
         theme->osd_hilite_label = RrAppearanceCopy(theme->a_focused_label);
-      }
+    }
     /* osd_hilite_fg can't be parentrel */
     if (!read_appearance(db, inst, "osd.hilight.bg", theme->osd_hilite_fg,
-        FALSE))
-      {
+            FALSE)) {
         RrAppearanceFree(theme->osd_hilite_fg);
         if (theme->a_focused_label->surface.grad != RR_SURFACE_PARENTREL)
-          theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
+            theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_label);
         else
-          theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
-      }
+            theme->osd_hilite_fg = RrAppearanceCopy(theme->a_focused_title);
+    }
     /* osd_unhilite_fg can't be parentrel either */
     if (!read_appearance(db, inst, "osd.unhilight.bg", theme->osd_unhilite_fg,
-        FALSE))
-      {
+            FALSE)) {
         RrAppearanceFree(theme->osd_unhilite_fg);
         if (theme->a_unfocused_label->surface.grad != RR_SURFACE_PARENTREL)
-          theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_label);
+            theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_label);
         else
-          theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_title);
-      }
+            theme->osd_unhilite_fg=RrAppearanceCopy(theme->a_unfocused_title);
+    }
 
     /* read buttons textures */
-      set_default_appearance(theme->a_disabled_focused_max);
-      set_default_appearance(theme->a_disabled_unfocused_max);
-      set_default_appearance(theme->a_focused_pressed_max);
-      set_default_appearance(theme->a_unfocused_pressed_max);
+    set_default_appearance(theme->a_disabled_focused_max);
+    set_default_appearance(theme->a_disabled_unfocused_max);
+    set_default_appearance(theme->a_focused_pressed_max);
+    set_default_appearance(theme->a_unfocused_pressed_max);
     if (!read_appearance(db, inst, "window.active.button.toggled.unpressed.bg",
-        theme->a_toggled_focused_unpressed_max, TRUE) && !read_appearance(db,
-        inst, "window.active.button.toggled.bg",
-        theme->a_toggled_focused_unpressed_max, TRUE))
-      {
+            theme->a_toggled_focused_unpressed_max, TRUE) && !read_appearance(
+            db, inst, "window.active.button.toggled.bg",
+            theme->a_toggled_focused_unpressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_focused_unpressed_max);
         theme->a_toggled_focused_unpressed_max
-            = RrAppearanceCopy(theme->a_focused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_focused_pressed_max);
+    }
     if (!read_appearance(db, inst,
-        "window.inactive.button.toggled.unpressed.bg",
-        theme->a_toggled_unfocused_unpressed_max, TRUE) && !read_appearance(db,
-        inst, "window.inactive.button.toggled.bg",
-        theme->a_toggled_unfocused_unpressed_max, TRUE))
-      {
+            "window.inactive.button.toggled.unpressed.bg",
+            theme->a_toggled_unfocused_unpressed_max, TRUE)
+            && !read_appearance(db, inst, "window.inactive.button.toggled.bg",
+                    theme->a_toggled_unfocused_unpressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_unfocused_unpressed_max);
         theme->a_toggled_unfocused_unpressed_max
-            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+    }
     if (!read_appearance(db, inst, "window.active.button.toggled.hover.bg",
-        theme->a_toggled_hover_focused_max, TRUE))
-      {
+            theme->a_toggled_hover_focused_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_hover_focused_max);
         theme->a_toggled_hover_focused_max
-            = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
+    }
     if (!read_appearance(db, inst, "window.inactive.button.toggled.hover.bg",
-        theme->a_toggled_hover_unfocused_max, TRUE))
-      {
+            theme->a_toggled_hover_unfocused_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_hover_unfocused_max);
         theme->a_toggled_hover_unfocused_max
-            = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
+    }
     if (!read_appearance(db, inst, "window.active.button.toggled.pressed.bg",
-        theme->a_toggled_focused_pressed_max, TRUE))
-      {
+            theme->a_toggled_focused_pressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_focused_pressed_max);
         theme->a_toggled_focused_pressed_max
-            = RrAppearanceCopy(theme->a_focused_pressed_max);
-      }
+                = RrAppearanceCopy(theme->a_focused_pressed_max);
+    }
     if (!read_appearance(db, inst, "window.inactive.button.toggled.pressed.bg",
-        theme->a_toggled_unfocused_pressed_max, TRUE))
-      {
+            theme->a_toggled_unfocused_pressed_max, TRUE)) {
         RrAppearanceFree(theme->a_toggled_unfocused_pressed_max);
         theme->a_toggled_unfocused_pressed_max
-            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
-      }
-      set_default_appearance(theme->a_focused_unpressed_max);
-      set_default_appearance(theme->a_unfocused_unpressed_max);
+                = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+    }
+    set_default_appearance(theme->a_focused_unpressed_max);
+    set_default_appearance(theme->a_unfocused_unpressed_max);
     if (!read_appearance(db, inst, "window.active.button.hover.bg",
-        theme->a_hover_focused_max, TRUE))
-      {
+            theme->a_hover_focused_max, TRUE)) {
         RrAppearanceFree(theme->a_hover_focused_max);
         theme->a_hover_focused_max
-            = RrAppearanceCopy(theme->a_focused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_focused_unpressed_max);
+    }
     if (!read_appearance(db, inst, "window.inactive.button.hover.bg",
-        theme->a_hover_unfocused_max, TRUE))
-      {
+            theme->a_hover_unfocused_max, TRUE)) {
         RrAppearanceFree(theme->a_hover_unfocused_max);
         theme->a_hover_unfocused_max
-            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
-      }
+                = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+    }
 
     theme->a_disabled_focused_close
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_close
-        = RrAppearanceCopy(theme->a_disabled_unfocused_max);
+            = RrAppearanceCopy(theme->a_disabled_unfocused_max);
     theme->a_hover_focused_close = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_close
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_unfocused_unpressed_close
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_close
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_close
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_close
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
     theme->a_disabled_focused_desk
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_desk
-        = RrAppearanceCopy(theme->a_disabled_unfocused_max);
+            = RrAppearanceCopy(theme->a_disabled_unfocused_max);
     theme->a_hover_focused_desk = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_desk
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_toggled_hover_focused_desk
-        = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
     theme->a_toggled_hover_unfocused_desk
-        = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
     theme->a_toggled_focused_unpressed_desk
-        = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
     theme->a_toggled_unfocused_unpressed_desk
-        = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
     theme->a_toggled_focused_pressed_desk
-        = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
     theme->a_toggled_unfocused_pressed_desk
-        = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
     theme->a_unfocused_unpressed_desk
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_desk
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_desk
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_desk
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
     theme->a_disabled_focused_shade
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_shade
-        = RrAppearanceCopy(theme->a_disabled_unfocused_max);
+            = RrAppearanceCopy(theme->a_disabled_unfocused_max);
     theme->a_hover_focused_shade = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_shade
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_toggled_hover_focused_shade
-        = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_focused_max);
     theme->a_toggled_hover_unfocused_shade
-        = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_toggled_hover_unfocused_max);
     theme->a_toggled_focused_unpressed_shade
-        = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
     theme->a_toggled_unfocused_unpressed_shade
-        = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
     theme->a_toggled_focused_pressed_shade
-        = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
     theme->a_toggled_unfocused_pressed_shade
-        = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
     theme->a_unfocused_unpressed_shade
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_shade
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_shade
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_shade
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
     theme->a_disabled_focused_iconify
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_disabled_unfocused_iconify
-        = RrAppearanceCopy(theme->a_disabled_focused_max);
+            = RrAppearanceCopy(theme->a_disabled_focused_max);
     theme->a_hover_focused_iconify
-        = RrAppearanceCopy(theme->a_hover_focused_max);
+            = RrAppearanceCopy(theme->a_hover_focused_max);
     theme->a_hover_unfocused_iconify
-        = RrAppearanceCopy(theme->a_hover_unfocused_max);
+            = RrAppearanceCopy(theme->a_hover_unfocused_max);
     theme->a_unfocused_unpressed_iconify
-        = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_unpressed_max);
     theme->a_unfocused_pressed_iconify
-        = RrAppearanceCopy(theme->a_unfocused_pressed_max);
+            = RrAppearanceCopy(theme->a_unfocused_pressed_max);
     theme->a_focused_unpressed_iconify
-        = RrAppearanceCopy(theme->a_focused_unpressed_max);
+            = RrAppearanceCopy(theme->a_focused_unpressed_max);
     theme->a_focused_pressed_iconify
-        = RrAppearanceCopy(theme->a_focused_pressed_max);
+            = RrAppearanceCopy(theme->a_focused_pressed_max);
 
     theme->a_icon->surface.grad
-        = theme->a_clear->surface.grad
-            = theme->a_clear_tex->surface.grad
-                = theme->a_menu_text_title->surface.grad
-                    = theme->a_menu_normal->surface.grad
-                        = theme->a_menu_disabled->surface.grad
-                            = theme->a_menu_text_normal->surface.grad
-                                = theme->a_menu_text_selected->surface.grad
-                                    = theme->a_menu_text_disabled->surface.grad
-                                        = theme->a_menu_text_disabled_selected->surface.grad
-                                            = theme->a_menu_bullet_normal->surface.grad
-                                                = theme->a_menu_bullet_selected->surface.grad
-                                                    = RR_SURFACE_PARENTREL;
+            = theme->a_clear->surface.grad
+                    = theme->a_clear_tex->surface.grad
+                            = theme->a_menu_text_title->surface.grad
+                                    = theme->a_menu_normal->surface.grad
+                                            = theme->a_menu_disabled->surface.grad
+                                                    = theme->a_menu_text_normal->surface.grad
+                                                            = theme->a_menu_text_selected->surface.grad
+                                                                    = theme->a_menu_text_disabled->surface.grad
+                                                                            = theme->a_menu_text_disabled_selected->surface.grad
+                                                                                    = theme->a_menu_bullet_normal->surface.grad
+                                                                                            = theme->a_menu_bullet_selected->surface.grad
+                                                                                                    = RR_SURFACE_PARENTREL;
 
     /* set up the textures */
     theme->a_focused_label->texture[0].type = RR_TEXTURE_TEXT;
     theme->a_focused_label->texture[0].data.text.justify = winjust;
     theme->a_focused_label->texture[0].data.text.font=theme->win_font_focused;
     theme->a_focused_label->texture[0].data.text.color
-        = theme->title_focused_color;
+            = theme->title_focused_color;
 
-    if (read_string(db, "window.active.label.text.font", &str))
-      {
+    if (read_string(db, "window.active.label.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_focused_label->texture[0].data.text.shadow_offset_x = i;
             theme->a_focused_label->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
 
             theme->title_focused_shadow_color = RrColorNew(inst, j, j, j);
             theme->title_focused_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->title_focused_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->title_focused_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_focused_label->texture[0].data.text.shadow_color
-        = theme->title_focused_shadow_color;
+            = theme->title_focused_shadow_color;
     theme->a_focused_label->texture[0].data.text.shadow_alpha
-        = theme->title_focused_shadow_alpha;
+            = theme->title_focused_shadow_alpha;
 
     theme->osd_hilite_label->texture[0].type = RR_TEXTURE_TEXT;
     theme->osd_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
     theme->osd_hilite_label->texture[0].data.text.font = theme->osd_font;
     theme->osd_hilite_label->texture[0].data.text.color = theme->osd_color;
 
-    if (read_string(db, "osd.label.text.font", &str))
-      {
+    if (read_string(db, "osd.label.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_focused_label->texture[0].data.text.shadow_offset_x = i;
             theme->a_focused_label->texture[0].data.text.shadow_offset_y = i;
             theme->osd_hilite_label->texture[0].data.text.shadow_offset_x = i;
             theme->osd_hilite_label->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
@@ -671,155 +628,143 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
             theme->title_focused_shadow_alpha = i;
             theme->osd_shadow_color = RrColorNew(inst, j, j, j);
             theme->osd_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->title_focused_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->title_focused_shadow_alpha = 50;
             theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->osd_shadow_alpha = 50;
-          }
-      }
-    else
-      {
+        }
+    }
+    else {
         /* inherit the font settings from the focused label */
         theme->osd_hilite_label->texture[0].data.text.shadow_offset_x
-            = theme->a_focused_label->texture[0].data.text.shadow_offset_x;
+                = theme->a_focused_label->texture[0].data.text.shadow_offset_x;
         theme->osd_hilite_label->texture[0].data.text.shadow_offset_y
-            = theme->a_focused_label->texture[0].data.text.shadow_offset_y;
+                = theme->a_focused_label->texture[0].data.text.shadow_offset_y;
         if (theme->title_focused_shadow_color)
-          theme->osd_shadow_color = RrColorNew(inst,
-              theme->title_focused_shadow_color->r,
-              theme->title_focused_shadow_color->g,
-              theme->title_focused_shadow_color->b);
+            theme->osd_shadow_color = RrColorNew(inst,
+                    theme->title_focused_shadow_color->r,
+                    theme->title_focused_shadow_color->g,
+                    theme->title_focused_shadow_color->b);
         else
-          theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
+            theme->osd_shadow_color = RrColorNew(inst, 0, 0, 0);
         theme->osd_shadow_alpha = theme->title_focused_shadow_alpha;
-      }
+    }
 
     theme->osd_hilite_label->texture[0].data.text.shadow_color
-        = theme->osd_shadow_color;
+            = theme->osd_shadow_color;
     theme->osd_hilite_label->texture[0].data.text.shadow_alpha
-        = theme->osd_shadow_alpha;
+            = theme->osd_shadow_alpha;
 
     theme->a_unfocused_label->texture[0].type = RR_TEXTURE_TEXT;
     theme->a_unfocused_label->texture[0].data.text.justify = winjust;
     theme->a_unfocused_label->texture[0].data.text.font
-        = theme->win_font_unfocused;
+            = theme->win_font_unfocused;
     theme->a_unfocused_label->texture[0].data.text.color
-        = theme->title_unfocused_color;
+            = theme->title_unfocused_color;
 
-    if (read_string(db, "window.inactive.label.text.font", &str))
-      {
+    if (read_string(db, "window.inactive.label.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_unfocused_label->texture[0].data.text.shadow_offset_x = i;
             theme->a_unfocused_label->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
 
             theme->title_unfocused_shadow_color = RrColorNew(inst, j, j, j);
             theme->title_unfocused_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->title_unfocused_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->title_unfocused_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_unfocused_label->texture[0].data.text.shadow_color
-        = theme->title_unfocused_shadow_color;
+            = theme->title_unfocused_shadow_color;
     theme->a_unfocused_label->texture[0].data.text.shadow_alpha
-        = theme->title_unfocused_shadow_alpha;
+            = theme->title_unfocused_shadow_alpha;
 
     theme->a_menu_text_title->texture[0].type = RR_TEXTURE_TEXT;
     theme->a_menu_text_title->texture[0].data.text.justify = mtitlejust;
     theme->a_menu_text_title->texture[0].data.text.font
-        = theme->menu_title_font;
+            = theme->menu_title_font;
     theme->a_menu_text_title->texture[0].data.text.color
-        = theme->menu_title_color;
+            = theme->menu_title_color;
 
-    if (read_string(db, "menu.title.text.font", &str))
-      {
+    if (read_string(db, "menu.title.text.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_menu_text_title->texture[0].data.text.shadow_offset_x = i;
             theme->a_menu_text_title->texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
 
             theme->menu_title_shadow_color = RrColorNew(inst, j, j, j);
             theme->menu_title_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->menu_title_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_title_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_menu_text_title->texture[0].data.text.shadow_color
-        = theme->menu_title_shadow_color;
+            = theme->menu_title_shadow_color;
     theme->a_menu_text_title->texture[0].data.text.shadow_alpha
-        = theme->menu_title_shadow_alpha;
+            = theme->menu_title_shadow_alpha;
 
     theme->a_menu_text_normal->texture[0].type
-        = theme->a_menu_text_selected->texture[0].type
-            = theme->a_menu_text_disabled->texture[0].type
-                = theme->a_menu_text_disabled_selected->texture[0].type
-                    = RR_TEXTURE_TEXT;
+            = theme->a_menu_text_selected->texture[0].type
+                    = theme->a_menu_text_disabled->texture[0].type
+                            = theme->a_menu_text_disabled_selected->texture[0].type
+                                    = RR_TEXTURE_TEXT;
     theme->a_menu_text_normal->texture[0].data.text.justify
-        = theme->a_menu_text_selected->texture[0].data.text.justify
-            = theme->a_menu_text_disabled->texture[0].data.text.justify
-                = theme->a_menu_text_disabled_selected->texture[0].data.text.justify
-                    = RR_JUSTIFY_LEFT;
+            = theme->a_menu_text_selected->texture[0].data.text.justify
+                    = theme->a_menu_text_disabled->texture[0].data.text.justify
+                            = theme->a_menu_text_disabled_selected->texture[0].data.text.justify
+                                    = RR_JUSTIFY_LEFT;
     theme->a_menu_text_normal->texture[0].data.text.font
-        = theme->a_menu_text_selected->texture[0].data.text.font
-            = theme->a_menu_text_disabled->texture[0].data.text.font
-                = theme->a_menu_text_disabled_selected->texture[0].data.text.font
-                    = theme->menu_font;
+            = theme->a_menu_text_selected->texture[0].data.text.font
+                    = theme->a_menu_text_disabled->texture[0].data.text.font
+                            = theme->a_menu_text_disabled_selected->texture[0].data.text.font
+                                    = theme->menu_font;
     theme->a_menu_text_normal->texture[0].data.text.color = theme->menu_color;
     theme->a_menu_text_selected->texture[0].data.text.color
-        = theme->menu_selected_color;
+            = theme->menu_selected_color;
     theme->a_menu_text_disabled->texture[0].data.text.color
-        = theme->menu_disabled_color;
+            = theme->menu_disabled_color;
     theme->a_menu_text_disabled_selected->texture[0].data.text.color
-        = theme->menu_disabled_selected_color;
+            = theme->menu_disabled_selected_color;
 
-    if (read_string(db, "menu.items.font", &str))
-      {
+    if (read_string(db, "menu.items.font", &str)) {
         char *p;
         gint i = 0;
         gint j;
-        if (strstr(str, "shadow=y"))
-          {
+        if (strstr(str, "shadow=y")) {
             if ((p = strstr(str, "shadowoffset=")))
-              i = parse_inline_number(p + strlen("shadowoffset="));
+                i = parse_inline_number(p + strlen("shadowoffset="));
             else
-              i = 1;
+                i = 1;
             theme->a_menu_text_normal->
             texture[0].data.text.shadow_offset_x = i;
             theme->a_menu_text_normal->
@@ -836,9 +781,8 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
             texture[0].data.text.shadow_offset_x = i;
             theme->a_menu_text_disabled_selected->
             texture[0].data.text.shadow_offset_y = i;
-          }
-        if ((p = strstr(str, "shadowtint=")))
-          {
+        }
+        if ((p = strstr(str, "shadowtint="))) {
             i = parse_inline_number(p + strlen("shadowtint="));
             j = (i > 0 ? 0 : 255);
             i = ABS(i*255/100);
@@ -850,276 +794,275 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
             theme->menu_text_selected_shadow_alpha = i;
             theme->menu_text_disabled_shadow_alpha = i;
             theme->menu_text_disabled_selected_shadow_alpha = i;
-          }
-        else
-          {
+        }
+        else {
             theme->menu_text_normal_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_text_selected_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_text_disabled_shadow_color = RrColorNew(inst, 0, 0, 0);
             theme->menu_text_normal_shadow_alpha = 50;
             theme->menu_text_selected_shadow_alpha = 50;
             theme->menu_text_disabled_selected_shadow_alpha = 50;
-          }
-      }
+        }
+    }
 
     theme->a_menu_text_normal->texture[0].data.text.shadow_color
-        = theme->menu_text_normal_shadow_color;
+            = theme->menu_text_normal_shadow_color;
     theme->a_menu_text_normal->texture[0].data.text.shadow_alpha
-        = theme->menu_text_normal_shadow_alpha;
+            = theme->menu_text_normal_shadow_alpha;
     theme->a_menu_text_selected->texture[0].data.text.shadow_color
-        = theme->menu_text_selected_shadow_color;
+            = theme->menu_text_selected_shadow_color;
     theme->a_menu_text_selected->texture[0].data.text.shadow_alpha
-        = theme->menu_text_selected_shadow_alpha;
+            = theme->menu_text_selected_shadow_alpha;
     theme->a_menu_text_disabled->texture[0].data.text.shadow_color
-        = theme->menu_text_disabled_shadow_color;
+            = theme->menu_text_disabled_shadow_color;
     theme->a_menu_text_disabled->texture[0].data.text.shadow_alpha
-        = theme->menu_text_disabled_shadow_alpha;
+            = theme->menu_text_disabled_shadow_alpha;
     theme->a_menu_text_disabled_selected->texture[0].data.text.shadow_color
-        = theme->menu_text_disabled_shadow_color;
+            = theme->menu_text_disabled_shadow_color;
     theme->a_menu_text_disabled_selected->texture[0].data.text.shadow_alpha
-        = theme->menu_text_disabled_shadow_alpha;
+            = theme->menu_text_disabled_shadow_alpha;
 
     theme->a_disabled_focused_max->texture[0].type
-        = theme->a_disabled_unfocused_max->texture[0].type
-            = theme->a_hover_focused_max->texture[0].type
-                = theme->a_hover_unfocused_max->texture[0].type
-                    = theme->a_toggled_hover_focused_max->texture[0].type
-                        = theme->a_toggled_hover_unfocused_max->texture[0].type
-                            = theme->a_toggled_focused_unpressed_max->texture[0].type
-                                = theme->a_toggled_unfocused_unpressed_max->texture[0].type
-                                    = theme->a_toggled_focused_pressed_max->texture[0].type
-                                        = theme->a_toggled_unfocused_pressed_max->texture[0].type
-                                            = theme->a_focused_unpressed_max->texture[0].type
-                                                = theme->a_focused_pressed_max->texture[0].type
-                                                    = theme->a_unfocused_unpressed_max->texture[0].type
-                                                        = theme->a_unfocused_pressed_max->texture[0].type
-                                                            = theme->a_disabled_focused_close->texture[0].type
-                                                                = theme->a_disabled_unfocused_close->texture[0].type
-                                                                    = theme->a_hover_focused_close->texture[0].type
-                                                                        = theme->a_hover_unfocused_close->texture[0].type
-                                                                            = theme->a_focused_unpressed_close->texture[0].type
-                                                                                = theme->a_focused_pressed_close->texture[0].type
-                                                                                    = theme->a_unfocused_unpressed_close->texture[0].type
-                                                                                        = theme->a_unfocused_pressed_close->texture[0].type
-                                                                                            = theme->a_disabled_focused_desk->texture[0].type
-                                                                                                = theme->a_disabled_unfocused_desk->texture[0].type
-                                                                                                    = theme->a_hover_focused_desk->texture[0].type
-                                                                                                        = theme->a_hover_unfocused_desk->texture[0].type
-                                                                                                            = theme->a_toggled_hover_focused_desk->texture[0].type
-                                                                                                                = theme->a_toggled_hover_unfocused_desk->texture[0].type
-                                                                                                                    = theme->a_toggled_focused_unpressed_desk->texture[0].type
-                                                                                                                        = theme->a_toggled_unfocused_unpressed_desk->texture[0].type
-                                                                                                                            = theme->a_toggled_focused_pressed_desk->texture[0].type
-                                                                                                                                = theme->a_toggled_unfocused_pressed_desk->texture[0].type
-                                                                                                                                    = theme->a_focused_unpressed_desk->texture[0].type
-                                                                                                                                        = theme->a_focused_pressed_desk->texture[0].type
-                                                                                                                                            = theme->a_unfocused_unpressed_desk->texture[0].type
-                                                                                                                                                = theme->a_unfocused_pressed_desk->texture[0].type
-                                                                                                                                                    = theme->a_disabled_focused_shade->texture[0].type
-                                                                                                                                                        = theme->a_disabled_unfocused_shade->texture[0].type
-                                                                                                                                                            = theme->a_hover_focused_shade->texture[0].type
-                                                                                                                                                                = theme->a_hover_unfocused_shade->texture[0].type
-                                                                                                                                                                    = theme->a_toggled_hover_focused_shade->texture[0].type
-                                                                                                                                                                        = theme->a_toggled_hover_unfocused_shade->texture[0].type
-                                                                                                                                                                            = theme->a_toggled_focused_unpressed_shade->texture[0].type
-                                                                                                                                                                                = theme->a_toggled_unfocused_unpressed_shade->texture[0].type
-                                                                                                                                                                                    = theme->a_toggled_focused_pressed_shade->texture[0].type
-                                                                                                                                                                                        = theme->a_toggled_unfocused_pressed_shade->texture[0].type
-                                                                                                                                                                                            = theme->a_focused_unpressed_shade->texture[0].type
-                                                                                                                                                                                                = theme->a_focused_pressed_shade->texture[0].type
-                                                                                                                                                                                                    = theme->a_unfocused_unpressed_shade->texture[0].type
-                                                                                                                                                                                                        = theme->a_unfocused_pressed_shade->texture[0].type
-                                                                                                                                                                                                            = theme->a_disabled_focused_iconify->texture[0].type
-                                                                                                                                                                                                                = theme->a_disabled_unfocused_iconify->texture[0].type
-                                                                                                                                                                                                                    = theme->a_hover_focused_iconify->texture[0].type
-                                                                                                                                                                                                                        = theme->a_hover_unfocused_iconify->texture[0].type
-                                                                                                                                                                                                                            = theme->a_focused_unpressed_iconify->texture[0].type
-                                                                                                                                                                                                                                = theme->a_focused_pressed_iconify->texture[0].type
-                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_iconify->texture[0].type
-                                                                                                                                                                                                                                        = theme->a_unfocused_pressed_iconify->texture[0].type
-                                                                                                                                                                                                                                            = theme->a_menu_bullet_normal->texture[0].type
-                                                                                                                                                                                                                                                = theme->a_menu_bullet_selected->texture[0].type
-                                                                                                                                                                                                                                                    = RR_TEXTURE_MASK;
+            = theme->a_disabled_unfocused_max->texture[0].type
+                    = theme->a_hover_focused_max->texture[0].type
+                            = theme->a_hover_unfocused_max->texture[0].type
+                                    = theme->a_toggled_hover_focused_max->texture[0].type
+                                            = theme->a_toggled_hover_unfocused_max->texture[0].type
+                                                    = theme->a_toggled_focused_unpressed_max->texture[0].type
+                                                            = theme->a_toggled_unfocused_unpressed_max->texture[0].type
+                                                                    = theme->a_toggled_focused_pressed_max->texture[0].type
+                                                                            = theme->a_toggled_unfocused_pressed_max->texture[0].type
+                                                                                    = theme->a_focused_unpressed_max->texture[0].type
+                                                                                            = theme->a_focused_pressed_max->texture[0].type
+                                                                                                    = theme->a_unfocused_unpressed_max->texture[0].type
+                                                                                                            = theme->a_unfocused_pressed_max->texture[0].type
+                                                                                                                    = theme->a_disabled_focused_close->texture[0].type
+                                                                                                                            = theme->a_disabled_unfocused_close->texture[0].type
+                                                                                                                                    = theme->a_hover_focused_close->texture[0].type
+                                                                                                                                            = theme->a_hover_unfocused_close->texture[0].type
+                                                                                                                                                    = theme->a_focused_unpressed_close->texture[0].type
+                                                                                                                                                            = theme->a_focused_pressed_close->texture[0].type
+                                                                                                                                                                    = theme->a_unfocused_unpressed_close->texture[0].type
+                                                                                                                                                                            = theme->a_unfocused_pressed_close->texture[0].type
+                                                                                                                                                                                    = theme->a_disabled_focused_desk->texture[0].type
+                                                                                                                                                                                            = theme->a_disabled_unfocused_desk->texture[0].type
+                                                                                                                                                                                                    = theme->a_hover_focused_desk->texture[0].type
+                                                                                                                                                                                                            = theme->a_hover_unfocused_desk->texture[0].type
+                                                                                                                                                                                                                    = theme->a_toggled_hover_focused_desk->texture[0].type
+                                                                                                                                                                                                                            = theme->a_toggled_hover_unfocused_desk->texture[0].type
+                                                                                                                                                                                                                                    = theme->a_toggled_focused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                                    = theme->a_toggled_focused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                    = theme->a_focused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                            = theme->a_focused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                                            = theme->a_unfocused_pressed_desk->texture[0].type
+                                                                                                                                                                                                                                                                                                    = theme->a_disabled_focused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                            = theme->a_disabled_unfocused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                    = theme->a_hover_focused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                            = theme->a_hover_unfocused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                    = theme->a_toggled_hover_focused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                            = theme->a_toggled_hover_unfocused_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                    = theme->a_toggled_focused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                    = theme->a_toggled_focused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                            = theme->a_toggled_unfocused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_focused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_focused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_unfocused_pressed_shade->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_disabled_focused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_disabled_unfocused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_hover_focused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_hover_unfocused_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_focused_unpressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_focused_pressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_unfocused_unpressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_unfocused_pressed_iconify->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = theme->a_menu_bullet_normal->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            = theme->a_menu_bullet_selected->texture[0].type
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    = RR_TEXTURE_MASK;
 
     theme->a_disabled_focused_max->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_max->texture[0].data.mask.mask
-            = theme->max_disabled_mask;
+            = theme->a_disabled_unfocused_max->texture[0].data.mask.mask
+                    = theme->max_disabled_mask;
     theme->a_hover_focused_max->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_max->texture[0].data.mask.mask
-            = theme->max_hover_mask;
+            = theme->a_hover_unfocused_max->texture[0].data.mask.mask
+                    = theme->max_hover_mask;
     theme->a_focused_pressed_max->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_max->texture[0].data.mask.mask
-            = theme->max_pressed_mask;
+            = theme->a_unfocused_pressed_max->texture[0].data.mask.mask
+                    = theme->max_pressed_mask;
     theme->a_focused_unpressed_max->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_max->texture[0].data.mask.mask
-            = theme->max_mask;
+            = theme->a_unfocused_unpressed_max->texture[0].data.mask.mask
+                    = theme->max_mask;
     theme->a_toggled_hover_focused_max->texture[0].data.mask.mask
-        = theme->a_toggled_hover_unfocused_max->texture[0].data.mask.mask
-            = theme->max_toggled_hover_mask;
+            = theme->a_toggled_hover_unfocused_max->texture[0].data.mask.mask
+                    = theme->max_toggled_hover_mask;
     theme->a_toggled_focused_unpressed_max->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.mask
-            = theme->max_toggled_mask;
+            = theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.mask
+                    = theme->max_toggled_mask;
     theme->a_toggled_focused_pressed_max->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.mask
-            = theme->max_toggled_pressed_mask;
+            = theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.mask
+                    = theme->max_toggled_pressed_mask;
     theme->a_disabled_focused_close->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_close->texture[0].data.mask.mask
-            = theme->close_disabled_mask;
+            = theme->a_disabled_unfocused_close->texture[0].data.mask.mask
+                    = theme->close_disabled_mask;
     theme->a_hover_focused_close->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_close->texture[0].data.mask.mask
-            = theme->close_hover_mask;
+            = theme->a_hover_unfocused_close->texture[0].data.mask.mask
+                    = theme->close_hover_mask;
     theme->a_focused_pressed_close->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_close->texture[0].data.mask.mask
-            = theme->close_pressed_mask;
+            = theme->a_unfocused_pressed_close->texture[0].data.mask.mask
+                    = theme->close_pressed_mask;
     theme->a_focused_unpressed_close->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_close->texture[0].data.mask.mask
-            = theme->close_mask;
+            = theme->a_unfocused_unpressed_close->texture[0].data.mask.mask
+                    = theme->close_mask;
     theme->a_disabled_focused_desk->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_desk->texture[0].data.mask.mask
-            = theme->desk_disabled_mask;
+            = theme->a_disabled_unfocused_desk->texture[0].data.mask.mask
+                    = theme->desk_disabled_mask;
     theme->a_hover_focused_desk->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_desk->texture[0].data.mask.mask
-            = theme->desk_hover_mask;
+            = theme->a_hover_unfocused_desk->texture[0].data.mask.mask
+                    = theme->desk_hover_mask;
     theme->a_focused_pressed_desk->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_desk->texture[0].data.mask.mask
-            = theme->desk_pressed_mask;
+            = theme->a_unfocused_pressed_desk->texture[0].data.mask.mask
+                    = theme->desk_pressed_mask;
     theme->a_focused_unpressed_desk->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_desk->texture[0].data.mask.mask
-            = theme->desk_mask;
+            = theme->a_unfocused_unpressed_desk->texture[0].data.mask.mask
+                    = theme->desk_mask;
     theme->a_toggled_hover_focused_desk->texture[0].data.mask.mask
-        = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.mask
-            = theme->desk_toggled_hover_mask;
+            = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.mask
+                    = theme->desk_toggled_hover_mask;
     theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.mask
-            = theme->desk_toggled_mask;
+            = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.mask
+                    = theme->desk_toggled_mask;
     theme->a_toggled_focused_pressed_desk->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.mask
-            = theme->desk_toggled_pressed_mask;
+            = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.mask
+                    = theme->desk_toggled_pressed_mask;
     theme->a_disabled_focused_shade->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_shade->texture[0].data.mask.mask
-            = theme->shade_disabled_mask;
+            = theme->a_disabled_unfocused_shade->texture[0].data.mask.mask
+                    = theme->shade_disabled_mask;
     theme->a_hover_focused_shade->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_shade->texture[0].data.mask.mask
-            = theme->shade_hover_mask;
+            = theme->a_hover_unfocused_shade->texture[0].data.mask.mask
+                    = theme->shade_hover_mask;
     theme->a_focused_pressed_shade->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_shade->texture[0].data.mask.mask
-            = theme->shade_pressed_mask;
+            = theme->a_unfocused_pressed_shade->texture[0].data.mask.mask
+                    = theme->shade_pressed_mask;
     theme->a_focused_unpressed_shade->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_shade->texture[0].data.mask.mask
-            = theme->shade_mask;
+            = theme->a_unfocused_unpressed_shade->texture[0].data.mask.mask
+                    = theme->shade_mask;
     theme->a_toggled_hover_focused_shade->texture[0].data.mask.mask
-        = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.mask
-            = theme->shade_toggled_hover_mask;
+            = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.mask
+                    = theme->shade_toggled_hover_mask;
     theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.mask
-            = theme->shade_toggled_mask;
+            = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.mask
+                    = theme->shade_toggled_mask;
     theme->a_toggled_focused_pressed_shade->texture[0].data.mask.mask
-        = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.mask
-            = theme->shade_toggled_pressed_mask;
+            = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.mask
+                    = theme->shade_toggled_pressed_mask;
     theme->a_disabled_focused_iconify->texture[0].data.mask.mask
-        = theme->a_disabled_unfocused_iconify->texture[0].data.mask.mask
-            = theme->iconify_disabled_mask;
+            = theme->a_disabled_unfocused_iconify->texture[0].data.mask.mask
+                    = theme->iconify_disabled_mask;
     theme->a_hover_focused_iconify->texture[0].data.mask.mask
-        = theme->a_hover_unfocused_iconify->texture[0].data.mask.mask
-            = theme->iconify_hover_mask;
+            = theme->a_hover_unfocused_iconify->texture[0].data.mask.mask
+                    = theme->iconify_hover_mask;
     theme->a_focused_pressed_iconify->texture[0].data.mask.mask
-        = theme->a_unfocused_pressed_iconify->texture[0].data.mask.mask
-            = theme->iconify_pressed_mask;
+            = theme->a_unfocused_pressed_iconify->texture[0].data.mask.mask
+                    = theme->iconify_pressed_mask;
     theme->a_focused_unpressed_iconify->texture[0].data.mask.mask
-        = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.mask
-            = theme->iconify_mask;
+            = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.mask
+                    = theme->iconify_mask;
     theme->a_menu_bullet_normal->texture[0].data.mask.mask
-        = theme->a_menu_bullet_selected->texture[0].data.mask.mask
-            = theme->menu_bullet_mask;
+            = theme->a_menu_bullet_selected->texture[0].data.mask.mask
+                    = theme->menu_bullet_mask;
     theme->a_disabled_focused_max->texture[0].data.mask.color
-        = theme->a_disabled_focused_close->texture[0].data.mask.color
-            = theme->a_disabled_focused_desk->texture[0].data.mask.color
-                = theme->a_disabled_focused_shade->texture[0].data.mask.color
-                    = theme->a_disabled_focused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_disabled_focused_color;
+            = theme->a_disabled_focused_close->texture[0].data.mask.color
+                    = theme->a_disabled_focused_desk->texture[0].data.mask.color
+                            = theme->a_disabled_focused_shade->texture[0].data.mask.color
+                                    = theme->a_disabled_focused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_disabled_focused_color;
     theme->a_disabled_unfocused_max->texture[0].data.mask.color
-        = theme->a_disabled_unfocused_close->texture[0].data.mask.color
-            = theme->a_disabled_unfocused_desk->texture[0].data.mask.color
-                = theme->a_disabled_unfocused_shade->texture[0].data.mask.color
-                    = theme->a_disabled_unfocused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_disabled_unfocused_color;
+            = theme->a_disabled_unfocused_close->texture[0].data.mask.color
+                    = theme->a_disabled_unfocused_desk->texture[0].data.mask.color
+                            = theme->a_disabled_unfocused_shade->texture[0].data.mask.color
+                                    = theme->a_disabled_unfocused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_disabled_unfocused_color;
     theme->a_hover_focused_max->texture[0].data.mask.color
-        = theme->a_hover_focused_close->texture[0].data.mask.color
-            = theme->a_hover_focused_desk->texture[0].data.mask.color
-                = theme->a_hover_focused_shade->texture[0].data.mask.color
-                    = theme->a_hover_focused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_hover_focused_color;
+            = theme->a_hover_focused_close->texture[0].data.mask.color
+                    = theme->a_hover_focused_desk->texture[0].data.mask.color
+                            = theme->a_hover_focused_shade->texture[0].data.mask.color
+                                    = theme->a_hover_focused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_hover_focused_color;
     theme->a_hover_unfocused_max->texture[0].data.mask.color
-        = theme->a_hover_unfocused_close->texture[0].data.mask.color
-            = theme->a_hover_unfocused_desk->texture[0].data.mask.color
-                = theme->a_hover_unfocused_shade->texture[0].data.mask.color
-                    = theme->a_hover_unfocused_iconify->texture[0].data.mask.color
-                        = theme->titlebut_hover_unfocused_color;
+            = theme->a_hover_unfocused_close->texture[0].data.mask.color
+                    = theme->a_hover_unfocused_desk->texture[0].data.mask.color
+                            = theme->a_hover_unfocused_shade->texture[0].data.mask.color
+                                    = theme->a_hover_unfocused_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_hover_unfocused_color;
     theme->a_toggled_hover_focused_max->texture[0].data.mask.color
-        = theme->a_toggled_hover_focused_desk->texture[0].data.mask.color
-            = theme->a_toggled_hover_focused_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_hover_focused_color;
+            = theme->a_toggled_hover_focused_desk->texture[0].data.mask.color
+                    = theme->a_toggled_hover_focused_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_hover_focused_color;
     theme->a_toggled_hover_unfocused_max->texture[0].data.mask.color
-        = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.color
-            = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_hover_unfocused_color;
+            = theme->a_toggled_hover_unfocused_desk->texture[0].data.mask.color
+                    = theme->a_toggled_hover_unfocused_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_hover_unfocused_color;
     theme->a_toggled_focused_unpressed_max->texture[0].data.mask.color
-        = theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_focused_unpressed_color;
+            = theme->a_toggled_focused_unpressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_focused_unpressed_color;
     theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.color
-        = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_unfocused_unpressed_color;
+            = theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_unfocused_unpressed_color;
     theme->a_toggled_focused_pressed_max->texture[0].data.mask.color
-        = theme->a_toggled_focused_pressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_focused_pressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_focused_pressed_color;
+            = theme->a_toggled_focused_pressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_focused_pressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_focused_pressed_color;
     theme->a_toggled_unfocused_pressed_max->texture[0].data.mask.color
-        = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.color
-            = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.color
-                = theme->titlebut_toggled_unfocused_pressed_color;
+            = theme->a_toggled_unfocused_pressed_desk->texture[0].data.mask.color
+                    = theme->a_toggled_unfocused_pressed_shade->texture[0].data.mask.color
+                            = theme->titlebut_toggled_unfocused_pressed_color;
     theme->a_focused_unpressed_max->texture[0].data.mask.color
-        = theme->a_focused_unpressed_close->texture[0].data.mask.color
-            = theme->a_focused_unpressed_desk->texture[0].data.mask.color
-                = theme->a_focused_unpressed_shade->texture[0].data.mask.color
-                    = theme->a_focused_unpressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_focused_unpressed_color;
+            = theme->a_focused_unpressed_close->texture[0].data.mask.color
+                    = theme->a_focused_unpressed_desk->texture[0].data.mask.color
+                            = theme->a_focused_unpressed_shade->texture[0].data.mask.color
+                                    = theme->a_focused_unpressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_focused_unpressed_color;
     theme->a_focused_pressed_max->texture[0].data.mask.color
-        = theme->a_focused_pressed_close->texture[0].data.mask.color
-            = theme->a_focused_pressed_desk->texture[0].data.mask.color
-                = theme->a_focused_pressed_shade->texture[0].data.mask.color
-                    = theme->a_focused_pressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_focused_pressed_color;
+            = theme->a_focused_pressed_close->texture[0].data.mask.color
+                    = theme->a_focused_pressed_desk->texture[0].data.mask.color
+                            = theme->a_focused_pressed_shade->texture[0].data.mask.color
+                                    = theme->a_focused_pressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_focused_pressed_color;
     theme->a_unfocused_unpressed_max->texture[0].data.mask.color
-        = theme->a_unfocused_unpressed_close->texture[0].data.mask.color
-            = theme->a_unfocused_unpressed_desk->texture[0].data.mask.color
-                = theme->a_unfocused_unpressed_shade->texture[0].data.mask.color
-                    = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_unfocused_unpressed_color;
+            = theme->a_unfocused_unpressed_close->texture[0].data.mask.color
+                    = theme->a_unfocused_unpressed_desk->texture[0].data.mask.color
+                            = theme->a_unfocused_unpressed_shade->texture[0].data.mask.color
+                                    = theme->a_unfocused_unpressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_unfocused_unpressed_color;
     theme->a_unfocused_pressed_max->texture[0].data.mask.color
-        = theme->a_unfocused_pressed_close->texture[0].data.mask.color
-            = theme->a_unfocused_pressed_desk->texture[0].data.mask.color
-                = theme->a_unfocused_pressed_shade->texture[0].data.mask.color
-                    = theme->a_unfocused_pressed_iconify->texture[0].data.mask.color
-                        = theme->titlebut_unfocused_pressed_color;
+            = theme->a_unfocused_pressed_close->texture[0].data.mask.color
+                    = theme->a_unfocused_pressed_desk->texture[0].data.mask.color
+                            = theme->a_unfocused_pressed_shade->texture[0].data.mask.color
+                                    = theme->a_unfocused_pressed_iconify->texture[0].data.mask.color
+                                            = theme->titlebut_unfocused_pressed_color;
     theme->a_menu_bullet_normal->texture[0].data.mask.color = theme->menu_color;
     theme->a_menu_bullet_selected->texture[0].data.mask.color
-        = theme->menu_selected_color;
+            = theme->menu_selected_color;
 
     /* set the font heights */
     theme->win_font_height = RrFontHeight(theme->win_font_focused,
-        theme->a_focused_label->texture[0].data.text.shadow_offset_y);
+            theme->a_focused_label->texture[0].data.text.shadow_offset_y);
     theme->win_font_height = MAX(theme->win_font_height, RrFontHeight(
-        theme->win_font_focused,
-        theme->a_unfocused_label->texture[0].data.text.shadow_offset_y));
+            theme->win_font_focused,
+            theme->a_unfocused_label->texture[0].data.text.shadow_offset_y));
     theme->menu_title_font_height = RrFontHeight(theme->menu_title_font,
-        theme->a_menu_text_title->texture[0].data.text.shadow_offset_y);
+            theme->a_menu_text_title->texture[0].data.text.shadow_offset_y);
     theme->menu_font_height = RrFontHeight(theme->menu_font,
-        theme->a_menu_text_normal->texture[0].data.text.shadow_offset_y);
+            theme->a_menu_text_normal->texture[0].data.text.shadow_offset_y);
 
     /* calculate some last extents */
-      {
+    {
         gint ft, fb, fl, fr, ut, ub, ul, ur;
 
         RrMargins(theme->a_focused_label, &fl, &ft, &fr, &fb);
@@ -1143,138 +1086,129 @@ gint load_theme_config(const RrInstance *inst, const gchar *name,
         RrMargins(theme->a_menu_title, &ul, &ut, &ur, &ub);
         theme->menu_title_label_height = theme->menu_title_font_height+ut+ub;
         theme->menu_title_height = theme->menu_title_label_height
-            + theme->paddingy * 2;
-      }
+                + theme->paddingy * 2;
+    }
     theme->button_size = theme->label_height - 2;
     theme->grip_width = 25;
 
     return 1;
-  }
+}
 
 static XrmDatabase loaddb(const gchar *name, gchar **path)
-  {
+{
     GSList *it;
     XrmDatabase db = NULL;
     gchar *s;
 
-    if (name[0] == '/')
-      {
+    if (name[0] == '/') {
         s = g_build_filename(name, "openbox-3", "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
-      }
-    else
-      {
+    }
+    else {
         /* XXX backwards compatibility, remove me sometime later */
         s = g_build_filename(g_get_home_dir(), ".themes", name, "openbox-3",
-            "themerc", NULL);
+                "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
 
-        for (it = parse_xdg_data_dir_paths(); !db && it; it = g_slist_next(it))
-          {
+        for (it = parse_xdg_data_dir_paths(); !db && it; it = g_slist_next(it)) {
             s = g_build_filename(it->data, "themes", name, "openbox-3",
-                "themerc", NULL);
+                    "themerc", NULL);
             if ((db = XrmGetFileDatabase(s)))
-              *path = g_path_get_dirname(s);
+                *path = g_path_get_dirname(s);
             g_free(s);
-          }
-      }
+        }
+    }
 
-    if (db == NULL)
-      {
+    if (db == NULL) {
         s = g_build_filename(name, "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
-      }
+    }
 
     return db;
-  }
+}
 
 static gchar *create_class_name(const gchar *rname)
-  {
+{
     gchar *rclass = g_strdup(rname);
     gchar *p = rclass;
 
-    while (TRUE)
-      {
+    while (TRUE) {
         *p = toupper(*p);
         p = strchr(p+1, '.');
         if (p == NULL)
-          break;
+            break;
         ++p;
         if (*p == '\0')
-          break;
-      }
+            break;
+    }
     return rclass;
-  }
+}
 
 static gboolean read_int(XrmDatabase db, const gchar *rname, gint *value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype, *end;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = (gint)strtol(retvalue.addr, &end, 10);
         if (end != retvalue.addr)
-          ret = TRUE;
-      }
+            ret = TRUE;
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = retvalue.addr;
         ret = TRUE;
-      }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_color(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrColor **value)
-  {
+        const gchar *rname, RrColor **value)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         RrColor *c = RrColorParse(inst, retvalue.addr);
-        if (c != NULL)
-          {
+        if (c != NULL) {
             *value = c;
             ret = TRUE;
-          }
-      }
+        }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 static gboolean read_mask(const RrInstance *inst, const gchar *path,
-    ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
-  {
+        ObFrameThemeConfig *theme, const gchar *maskname, RrPixmapMask **value)
+{
     gboolean ret = FALSE;
     gchar *s;
     gint hx, hy; /* ignored */
@@ -1282,89 +1216,82 @@ static gboolean read_mask(const RrInstance *inst, const gchar *path,
     guchar *b;
 
     s = g_build_filename(path, maskname, NULL);
-    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess)
-      {
+    if (XReadBitmapFileData(s, &w, &h, &b, &hx, &hy) == BitmapSuccess) {
         ret = TRUE;
         *value = RrPixmapMaskNew(inst, w, h, (gchar*)b);
         XFree(b);
-      }
+    }
     g_free(s);
 
     return ret;
-  }
+}
 
 static void parse_appearance(gchar *tex, RrSurfaceColorType *grad,
-    RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
-    gboolean *border, gboolean allow_trans)
-  {
+        RrReliefType *relief, RrBevelType *bevel, gboolean *interlaced,
+        gboolean *border, gboolean allow_trans)
+{
     gchar *t;
 
     /* convert to all lowercase */
     for (t = tex; *t != '\0'; ++t)
-      *t = g_ascii_tolower(*t);
+        *t = g_ascii_tolower(*t);
 
-    if (allow_trans && strstr(tex, "parentrelative") != NULL)
-      {
+    if (allow_trans && strstr(tex, "parentrelative") != NULL) {
         *grad = RR_SURFACE_PARENTREL;
-      }
-    else
-      {
-        if (strstr(tex, "gradient") != NULL)
-          {
+    }
+    else {
+        if (strstr(tex, "gradient") != NULL) {
             if (strstr(tex, "crossdiagonal") != NULL)
-              *grad = RR_SURFACE_CROSS_DIAGONAL;
+                *grad = RR_SURFACE_CROSS_DIAGONAL;
             else if (strstr(tex, "pyramid") != NULL)
-              *grad = RR_SURFACE_PYRAMID;
+                *grad = RR_SURFACE_PYRAMID;
             else if (strstr(tex, "mirrorhorizontal") != NULL)
-              *grad = RR_SURFACE_MIRROR_HORIZONTAL;
+                *grad = RR_SURFACE_MIRROR_HORIZONTAL;
             else if (strstr(tex, "horizontal") != NULL)
-              *grad = RR_SURFACE_HORIZONTAL;
+                *grad = RR_SURFACE_HORIZONTAL;
             else if (strstr(tex, "splitvertical") != NULL)
-              *grad = RR_SURFACE_SPLIT_VERTICAL;
+                *grad = RR_SURFACE_SPLIT_VERTICAL;
             else if (strstr(tex, "vertical") != NULL)
-              *grad = RR_SURFACE_VERTICAL;
+                *grad = RR_SURFACE_VERTICAL;
             else
-              *grad = RR_SURFACE_DIAGONAL;
-          }
-        else
-          {
+                *grad = RR_SURFACE_DIAGONAL;
+        }
+        else {
             *grad = RR_SURFACE_SOLID;
-          }
-      }
+        }
+    }
 
     if (strstr(tex, "sunken") != NULL)
-      *relief = RR_RELIEF_SUNKEN;
+        *relief = RR_RELIEF_SUNKEN;
     else if (strstr(tex, "flat") != NULL)
-      *relief = RR_RELIEF_FLAT;
+        *relief = RR_RELIEF_FLAT;
     else if (strstr(tex, "raised") != NULL)
-      *relief = RR_RELIEF_RAISED;
+        *relief = RR_RELIEF_RAISED;
     else
-      *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
-          : RR_RELIEF_RAISED;
+        *relief = (*grad == RR_SURFACE_PARENTREL) ? RR_RELIEF_FLAT
+                : RR_RELIEF_RAISED;
 
     *border = FALSE;
-    if (*relief == RR_RELIEF_FLAT)
-      {
+    if (*relief == RR_RELIEF_FLAT) {
         if (strstr(tex, "border") != NULL)
-          *border = TRUE;
-      }
-    else
-      {
+            *border = TRUE;
+    }
+    else {
         if (strstr(tex, "bevel2") != NULL)
-          *bevel = RR_BEVEL_2;
+            *bevel = RR_BEVEL_2;
         else
-          *bevel = RR_BEVEL_1;
-      }
+            *bevel = RR_BEVEL_1;
+    }
 
     if (strstr(tex, "interlaced") != NULL)
-      *interlaced = TRUE;
+        *interlaced = TRUE;
     else
-      *interlaced = FALSE;
-  }
+        *interlaced = FALSE;
+}
 
 static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
-    const gchar *rname, RrAppearance *value, gboolean allow_trans)
-  {
+        const gchar *rname, RrAppearance *value, gboolean allow_trans)
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *cname, *ctoname, *bcname, *icname, *hname, *sname;
@@ -1383,32 +1310,29 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     ctosplitname = g_strconcat(rname, ".colorTo.splitTo", NULL);
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         parse_appearance(retvalue.addr, &value->surface.grad,
-            &value->surface.relief, &value->surface.bevel,
-            &value->surface.interlaced, &value->surface.border, allow_trans);
+                &value->surface.relief, &value->surface.bevel,
+                &value->surface.interlaced, &value->surface.border, allow_trans);
         if (!read_color(db, inst, cname, &value->surface.primary))
-          value->surface.primary = RrColorNew(inst, 0, 0, 0);
+            value->surface.primary = RrColorNew(inst, 0, 0, 0);
         if (!read_color(db, inst, ctoname, &value->surface.secondary))
-          value->surface.secondary = RrColorNew(inst, 0, 0, 0);
+            value->surface.secondary = RrColorNew(inst, 0, 0, 0);
         if (value->surface.border)
-          if (!read_color(db, inst, bcname, &value->surface.border_color))
-            value->surface.border_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, bcname, &value->surface.border_color))
+                value->surface.border_color = RrColorNew(inst, 0, 0, 0);
         if (value->surface.interlaced)
-          if (!read_color(db, inst, icname, &value->surface.interlace_color))
-            value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
+            if (!read_color(db, inst, icname, &value->surface.interlace_color))
+                value->surface.interlace_color = RrColorNew(inst, 0, 0, 0);
         if (read_int(db, hname, &i) && i >= 0)
-          value->surface.bevel_light_adjust = i;
+            value->surface.bevel_light_adjust = i;
         if (read_int(db, sname, &i) && i >= 0 && i <= 256)
-          value->surface.bevel_dark_adjust = i;
+            value->surface.bevel_dark_adjust = i;
 
-        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL)
-          {
+        if (value->surface.grad == RR_SURFACE_SPLIT_VERTICAL) {
             gint r, g, b;
 
-            if (!read_color(db, inst, csplitname, &value->surface.split_primary))
-              {
+            if (!read_color(db, inst, csplitname, &value->surface.split_primary)) {
                 r = value->surface.primary->r;
                 r += r >> 2;
                 g = value->surface.primary->g;
@@ -1416,17 +1340,16 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.primary->b;
                 b += b >> 2;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_primary = RrColorNew(inst, r, g, b);
-              }
+            }
 
             if (!read_color(db, inst, ctosplitname,
-                &value->surface.split_secondary))
-              {
+                    &value->surface.split_secondary)) {
                 r = value->surface.secondary->r;
                 r += r >> 4;
                 g = value->surface.secondary->g;
@@ -1434,17 +1357,17 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
                 b = value->surface.secondary->b;
                 b += b >> 4;
                 if (r > 0xFF)
-                  r = 0xFF;
+                    r = 0xFF;
                 if (g > 0xFF)
-                  g = 0xFF;
+                    g = 0xFF;
                 if (b > 0xFF)
-                  b = 0xFF;
+                    b = 0xFF;
                 value->surface.split_secondary = RrColorNew(inst, r, g, b);
-              }
-          }
+            }
+        }
 
         ret = TRUE;
-      }
+    }
 
     g_free(ctosplitname);
     g_free(csplitname);
@@ -1456,25 +1379,24 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst,
     g_free(cname);
     g_free(rclass);
     return ret;
-  }
+}
 
 static int parse_inline_number(const char *p)
-  {
+{
     int neg = 1;
     int res = 0;
-    if (*p == '-')
-      {
+    if (*p == '-') {
         neg = -1;
         ++p;
-      }
+    }
     for (; isdigit(*p); ++p)
-      res = res * 10 + *p - '0';
+        res = res * 10 + *p - '0';
     res *= neg;
     return res;
-  }
+}
 
 static void set_default_appearance(RrAppearance *a)
-  {
+{
     a->surface.grad = RR_SURFACE_SOLID;
     a->surface.relief = RR_RELIEF_FLAT;
     a->surface.bevel = RR_BEVEL_1;
@@ -1482,28 +1404,27 @@ static void set_default_appearance(RrAppearance *a)
     a->surface.border = FALSE;
     a->surface.primary = RrColorNew(a->inst, 0, 0, 0);
     a->surface.secondary = RrColorNew(a->inst, 0, 0, 0);
-  }
+}
 
 /* Reads the output from gimp's C-Source file format into valid RGBA data for
  an RrTextureRGBA. */
 static RrPixel32* read_c_image(gint width, gint height, const guint8 *data)
-  {
+{
     RrPixel32 *im, *p;
     gint i;
 
     p = im = g_memdup(data, width * height * sizeof(RrPixel32));
 
-    for (i = 0; i < width * height; ++i)
-      {
+    for (i = 0; i < width * height; ++i) {
         guchar a = ((*p >> 24) & 0xff);
         guchar b = ((*p >> 16) & 0xff);
         guchar g = ((*p >> 8) & 0xff);
         guchar r = ((*p >> 0) & 0xff);
 
         *p = ((r << RrDefaultRedOffset) + (g << RrDefaultGreenOffset) + (b
-            << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
+                << RrDefaultBlueOffset) + (a << RrDefaultAlphaOffset));
         p++;
-      }
+    }
 
     return im;
-  }
+}
diff --git a/engines/minimal/frame_minimal_config.h b/engines/minimal/frame_minimal_config.h
index 4cc4ae3..8e832bd 100644
--- a/engines/minimal/frame_minimal_config.h
+++ b/engines/minimal/frame_minimal_config.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
 
 /* This store frame layout configuration. */
 struct _ObFrameThemeConfig
-  {
+{
     const RrInstance *inst;
 
     /* style settings - fonts */
@@ -235,16 +235,16 @@ struct _ObFrameThemeConfig
     RrAppearance *osd_unhilite_fg; /* can never be parent relative */
 
     gchar *name;
-  };
+};
 
 typedef struct _ObFrameThemeConfig ObFrameThemeConfig;
 
 /*! The font values are all optional. If a NULL is used for any of them, then
  the default font will be used. */
 gint load_theme_config(const RrInstance *inst, const gchar *name,
-    const gchar * path, XrmDatabase db, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font);
+        const gchar * path, XrmDatabase db, RrFont *active_window_font,
+        RrFont *inactive_window_font, RrFont *menu_title_font,
+        RrFont *menu_item_font, RrFont *osd_font);
 
 G_END_DECLS
 
diff --git a/engines/minimal/frame_minimal_plugin.c b/engines/minimal/frame_minimal_plugin.c
index f1a8c97..230bd03 100644
--- a/engines/minimal/frame_minimal_plugin.c
+++ b/engines/minimal/frame_minimal_plugin.c
@@ -34,15 +34,14 @@
 #include "openbox/screen.h"
 #include "render/theme.h"
 
-
 typedef enum
-  {
+{
     OB_FLAG_MAX = 1 << 0,
     OB_FLAG_CLOSE = 1 << 1,
     OB_FLAG_DESK = 1 << 2,
     OB_FLAG_SHADE = 1 << 3,
     OB_FLAG_ICONIFY = 1 << 4
-  } ObFrameFlags;
+} ObFrameFlags;
 
 #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
                          ButtonPressMask | ButtonReleaseMask | \
@@ -57,43 +56,43 @@ typedef enum
 #define FRAME_HANDLE_Y(f) (f->size.top + f->client->area.height + f->cbwidth_b)
 
 Window createWindow(Window parent, Visual *visual, gulong mask,
-    XSetWindowAttributes *attrib)
-  {
-    return XCreateWindow(plugin.ob_display, parent, 0, 0, 1, 1, 0,
-        (visual ? 32 : RrDepth(plugin.ob_rr_inst)), InputOutput,
-        (visual ? visual : RrVisual(plugin.ob_rr_inst)), mask, attrib);
+        XSetWindowAttributes *attrib)
+{
+    return XCreateWindow(plugin.ob_display, parent, 0, 0, 1, 1, 0, (visual ? 32
+            : RrDepth(plugin.ob_rr_inst)), InputOutput, (visual ? visual
+            : RrVisual(plugin.ob_rr_inst)), mask, attrib);
 
-  }
+}
 
 Visual *check_32bit_client(ObClient *c)
-  {
+{
     XWindowAttributes wattrib;
     Status ret;
 
     /* we're already running at 32 bit depth, yay. we don't need to use their
      visual */
     if (RrDepth(plugin.ob_rr_inst) == 32)
-      return NULL;
+        return NULL;
 
     ret = XGetWindowAttributes(plugin.ob_display, c->window, &wattrib);
     g_assert(ret != BadDrawable);
     g_assert(ret != BadWindow);
 
     if (wattrib.depth == 32)
-      return wattrib.visual;
+        return wattrib.visual;
     return NULL;
-  }
+}
 
 /* Not used */
 gint init(Display * display, gint screen)
-  {
+{
     plugin.ob_display = display;
     plugin.ob_screen = screen;
-  }
+}
 
 /* init a new frame */
 gpointer frame_new(struct _ObClient * client)
-  {
+{
     XSetWindowAttributes attrib;
     gulong mask;
     ObDefaultFrame *self;
@@ -107,31 +106,29 @@ gpointer frame_new(struct _ObClient * client)
     /* create the non-visible decor windows */
 
     mask = 0;
-    if (visual)
-      {
+    if (visual) {
         /* client has a 32-bit visual */
         mask |= CWColormap | CWBackPixel | CWBorderPixel;
         /* create a colormap with the visual */
         OBDEFAULTFRAME(self)->colormap = attrib.colormap = XCreateColormap(
-            plugin.ob_display, RootWindow(plugin.ob_display,
-                plugin.ob_screen), visual, AllocNone);
+                plugin.ob_display, RootWindow(plugin.ob_display,
+                        plugin.ob_screen), visual, AllocNone);
         attrib.background_pixel = BlackPixel(plugin.ob_display,
-            plugin.ob_screen);
-        attrib.border_pixel = BlackPixel(plugin.ob_display,
-            plugin.ob_screen);
-      }
-    self->window = createWindow(RootWindow(plugin.ob_display,
-        plugin.ob_screen), visual, mask, &attrib);
+                plugin.ob_screen);
+        attrib.border_pixel = BlackPixel(plugin.ob_display, plugin.ob_screen);
+    }
+    self->window = createWindow(
+            RootWindow(plugin.ob_display, plugin.ob_screen), visual, mask,
+            &attrib);
 
     /* create the visible decor windows */
 
     mask = 0;
-    if (visual)
-      {
+    if (visual) {
         /* client has a 32-bit visual */
         mask |= CWColormap | CWBackPixel | CWBorderPixel;
         attrib.colormap = RrColormap(plugin.ob_rr_inst);
-      }
+    }
 
     self->backback = createWindow(self->window, NULL, mask, &attrib);
     self->backfront = createWindow(self->backback, NULL, mask, &attrib);
@@ -197,68 +194,53 @@ gpointer frame_new(struct _ObClient * client)
     XMapWindow(plugin.ob_display, self->backfront);
 
     self->max_press = self->close_press = self->desk_press
-        = self->iconify_press = self->shade_press = FALSE;
+            = self->iconify_press = self->shade_press = FALSE;
     self->max_hover = self->close_hover = self->desk_hover
-        = self->iconify_hover = self->shade_hover = FALSE;
+            = self->iconify_hover = self->shade_hover = FALSE;
 
     set_theme_statics(self);
 
     return (ObFrame*)self;
-  }
+}
 
 void set_theme_statics(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     /* set colors/appearance/sizes for stuff that doesn't change */
-    XResizeWindow(plugin.ob_display, self->max,
-        theme_config.button_size,
-        theme_config.button_size);
-    XResizeWindow(plugin.ob_display, self->iconify,
-        theme_config.button_size,
-        theme_config.button_size);
-    XResizeWindow(plugin.ob_display, self->icon,
-        theme_config.button_size + 2,
-        theme_config.button_size + 2);
-    XResizeWindow(plugin.ob_display, self->close,
-        theme_config.button_size,
-        theme_config.button_size);
-    XResizeWindow(plugin.ob_display, self->desk,
-        theme_config.button_size,
-        theme_config.button_size);
-    XResizeWindow(plugin.ob_display, self->shade,
-        theme_config.button_size,
-        theme_config.button_size);
-    XResizeWindow(plugin.ob_display, self->tltresize,
-        theme_config.grip_width,
-        theme_config.paddingy + 1);
-    XResizeWindow(plugin.ob_display, self->trtresize,
-        theme_config.grip_width,
-        theme_config.paddingy + 1);
+    XResizeWindow(plugin.ob_display, self->max, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->iconify, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->icon, theme_config.button_size + 2,
+            theme_config.button_size + 2);
+    XResizeWindow(plugin.ob_display, self->close, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->desk, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->shade, theme_config.button_size,
+            theme_config.button_size);
+    XResizeWindow(plugin.ob_display, self->tltresize, theme_config.grip_width,
+            theme_config.paddingy + 1);
+    XResizeWindow(plugin.ob_display, self->trtresize, theme_config.grip_width,
+            theme_config.paddingy + 1);
     XResizeWindow(plugin.ob_display, self->tllresize,
-        theme_config.paddingx + 1,
-        theme_config.title_height);
+            theme_config.paddingx + 1, theme_config.title_height);
     XResizeWindow(plugin.ob_display, self->trrresize,
-        theme_config.paddingx + 1,
-        theme_config.title_height);
+            theme_config.paddingx + 1, theme_config.title_height);
 
     /* set up the dynamic appearances */
-    self->a_unfocused_title
-        = RrAppearanceCopy(theme_config.a_unfocused_title);
-    self->a_focused_title
-        = RrAppearanceCopy(theme_config.a_focused_title);
-    self->a_unfocused_label
-        = RrAppearanceCopy(theme_config.a_unfocused_label);
-    self->a_focused_label
-        = RrAppearanceCopy(theme_config.a_focused_label);
+    self->a_unfocused_title = RrAppearanceCopy(theme_config.a_unfocused_title);
+    self->a_focused_title = RrAppearanceCopy(theme_config.a_focused_title);
+    self->a_unfocused_label = RrAppearanceCopy(theme_config.a_unfocused_label);
+    self->a_focused_label = RrAppearanceCopy(theme_config.a_focused_label);
     self->a_unfocused_handle
-        = RrAppearanceCopy(theme_config.a_unfocused_handle);
-    self->a_focused_handle
-        = RrAppearanceCopy(theme_config.a_focused_handle);
+            = RrAppearanceCopy(theme_config.a_unfocused_handle);
+    self->a_focused_handle = RrAppearanceCopy(theme_config.a_focused_handle);
     self->a_icon = RrAppearanceCopy(theme_config.a_icon);
-  }
+}
 
 void free_theme_statics(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     RrAppearanceFree(self->a_unfocused_title);
     RrAppearanceFree(self->a_focused_title);
@@ -267,22 +249,21 @@ void free_theme_statics(gpointer _self)
     RrAppearanceFree(self->a_unfocused_handle);
     RrAppearanceFree(self->a_focused_handle);
     RrAppearanceFree(self->a_icon);
-  }
+}
 
 void frame_free(gpointer self)
-  {
+{
     free_theme_statics(OBDEFAULTFRAME(self));
     XDestroyWindow(plugin.ob_display, OBDEFAULTFRAME(self)->window);
     if (OBDEFAULTFRAME(self)->colormap)
-      XFreeColormap(plugin.ob_display, OBDEFAULTFRAME(self)->colormap);
+        XFreeColormap(plugin.ob_display, OBDEFAULTFRAME(self)->colormap);
     g_free(self);
-  }
+}
 
 void frame_show(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
-    if (!self->visible)
-      {
+    if (!self->visible) {
         self->visible = TRUE;
         framerender_frame(self);
         /* Grab the server to make sure that the frame window is mapped before
@@ -292,93 +273,91 @@ void frame_show(gpointer _self)
         XMapWindow(plugin.ob_display, self->client->window);
         XMapWindow(plugin.ob_display, self->window);
         grab_server(FALSE);
-      }
-  }
+    }
+}
 
 void frame_hide(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
-    if (self->visible)
-      {
+    if (self->visible) {
         self->visible = FALSE;
         if (!frame_iconify_animating(self))
-          XUnmapWindow(plugin.ob_display, self->window);
+            XUnmapWindow(plugin.ob_display, self->window);
         /* we unmap the client itself so that we can get MapRequest
          events, and because the ICCCM tells us to! */
         XUnmapWindow(plugin.ob_display, self->client->window);
         self->client->ignore_unmaps += 1;
-      }
-  }
+    }
+}
 
 void frame_adjust_theme(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     free_theme_statics(self);
     set_theme_statics(self);
-  }
+}
 
 void frame_adjust_shape(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
 #ifdef SHAPE
     gint num;
     XRectangle xrect[2];
 
     if (!self->client->shaped)
-      {
+    {
         /* clear the shape on the frame window */
         XShapeCombineMask(plugin.ob_display, self->window, ShapeBounding,
-            self->size.left,
-            self->size.top,
-            None, ShapeSet);
-      }
+                self->size.left,
+                self->size.top,
+                None, ShapeSet);
+    }
     else
-      {
+    {
         /* make the frame's shape match the clients */
         XShapeCombineShape(plugin.ob_display, self->window, ShapeBounding,
-            self->size.left,
-            self->size.top,
-            self->client->window,
-            ShapeBounding, ShapeSet);
+                self->size.left,
+                self->size.top,
+                self->client->window,
+                ShapeBounding, ShapeSet);
 
         num = 0;
         if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-          {
+        {
             xrect[0].x = 0;
             xrect[0].y = 0;
             xrect[0].width = self->area.width;
             xrect[0].height = self->size.top;
             ++num;
-          }
+        }
 
         if (self->decorations & OB_FRAME_DECOR_HANDLE &&
-            theme_config.handle_height > 0)
-          {
+                theme_config.handle_height> 0)
+        {
             xrect[1].x = 0;
             xrect[1].y = FRAME_HANDLE_Y(self);
             xrect[1].width = self->area.width;
             xrect[1].height = theme_config.handle_height +
             self->bwidth * 2;
             ++num;
-          }
+        }
 
         XShapeCombineRectangles(plugin.ob_display, self->window,
-            ShapeBounding, 0, 0, xrect, num,
-            ShapeUnion, Unsorted);
-      }
+                ShapeBounding, 0, 0, xrect, num,
+                ShapeUnion, Unsorted);
+    }
 #endif
-  }
+}
 
 void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
-    gboolean fake)
-  {
+        gboolean fake)
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     Strut oldsize;
 
     oldsize = self->size;
 
-    if (resized)
-      {
+    if (resized) {
         /* do this before changing the frame's status like max_horz max_vert */
         frame_adjust_cursors(self);
 
@@ -389,217 +368,182 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
         self->shaded = self->client->shaded;
 
         if (self->decorations & OB_FRAME_DECOR_BORDER
-            || (self->client->undecorated
-                && plugin.config_theme_keepborder))
-          self->bwidth = theme_config.fbwidth;
+                || (self->client->undecorated && plugin.config_theme_keepborder))
+            self->bwidth = theme_config.fbwidth;
         else
-          self->bwidth = 0;
-
-        if (self->decorations & OB_FRAME_DECOR_BORDER)
-          {
-            self->cbwidth_l = self->cbwidth_r
-                = theme_config.cbwidthx;
-            self->cbwidth_t = self->cbwidth_b
-                = theme_config.cbwidthy;
-          }
+            self->bwidth = 0;
+
+        if (self->decorations & OB_FRAME_DECOR_BORDER) {
+            self->cbwidth_l = self->cbwidth_r = theme_config.cbwidthx;
+            self->cbwidth_t = self->cbwidth_b = theme_config.cbwidthy;
+        }
         else
-          self->cbwidth_l = self->cbwidth_t = self->cbwidth_r = self->cbwidth_b
-              = 0;
+            self->cbwidth_l = self->cbwidth_t = self->cbwidth_r
+                    = self->cbwidth_b = 0;
 
-        if (self->max_horz)
-          {
+        if (self->max_horz) {
             self->cbwidth_l = self->cbwidth_r = 0;
             self->width = self->client->area.width;
             if (self->max_vert)
-              self->cbwidth_b = 0;
-          }
+                self->cbwidth_b = 0;
+        }
         else
-          self->width = self->client->area.width + self->cbwidth_l
-              + self->cbwidth_r;
+            self->width = self->client->area.width + self->cbwidth_l
+                    + self->cbwidth_r;
 
         /* some elements are sized based of the width, so don't let them have
          negative values */
-        self->width = MAX(self->width, (theme_config.grip_width
-            + self->bwidth) * 2 + 1);
+        self->width = MAX(self->width, (theme_config.grip_width + self->bwidth)
+                * 2 + 1);
 
         STRUT_SET(self->size, self->cbwidth_l + (!self->max_horz ? self->bwidth
-            : 0), self->cbwidth_t + self->bwidth, self->cbwidth_r
-            + (!self->max_horz ? self->bwidth : 0), self->cbwidth_b
-            + (!self->max_horz || !self->max_vert ? self->bwidth : 0));
+                : 0), self->cbwidth_t + self->bwidth, self->cbwidth_r
+                + (!self->max_horz ? self->bwidth : 0), self->cbwidth_b
+                + (!self->max_horz || !self->max_vert ? self->bwidth : 0));
 
         if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-          self->size.top += theme_config.title_height
-              + self->bwidth;
+            self->size.top += theme_config.title_height + self->bwidth;
         if (self->decorations & OB_FRAME_DECOR_HANDLE
-            && theme_config.handle_height > 0)
-          {
-            self->size.bottom += theme_config.handle_height
-                + self->bwidth;
-          }
+                && theme_config.handle_height > 0) {
+            self->size.bottom += theme_config.handle_height + self->bwidth;
+        }
 
         /* position/size and map/unmap all the windows */
 
-        if (!fake)
-          {
+        if (!fake) {
             gint innercornerheight = theme_config.grip_width
-                - self->size.bottom;
+                    - self->size.bottom;
 
-            if (self->cbwidth_l)
-              {
+            if (self->cbwidth_l) {
                 XMoveResizeWindow(plugin.ob_display, self->innerleft,
-                    self->size.left - self->cbwidth_l, self->size.top,
-                    self->cbwidth_l, self->client->area.height);
+                        self->size.left - self->cbwidth_l, self->size.top,
+                        self->cbwidth_l, self->client->area.height);
 
                 XMapWindow(plugin.ob_display, self->innerleft);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->innerleft);
+                XUnmapWindow(plugin.ob_display, self->innerleft);
 
-            if (self->cbwidth_l && innercornerheight > 0)
-              {
+            if (self->cbwidth_l && innercornerheight > 0) {
                 XMoveResizeWindow(plugin.ob_display, self->innerbll, 0,
-                    self->client->area.height
-                        - (theme_config.grip_width
-                            - self->size.bottom), self->cbwidth_l,
-                            theme_config.grip_width - self->size.bottom);
+                        self->client->area.height - (theme_config.grip_width
+                                - self->size.bottom), self->cbwidth_l,
+                        theme_config.grip_width - self->size.bottom);
 
                 XMapWindow(plugin.ob_display, self->innerbll);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->innerbll);
+                XUnmapWindow(plugin.ob_display, self->innerbll);
 
-            if (self->cbwidth_r)
-              {
+            if (self->cbwidth_r) {
                 XMoveResizeWindow(plugin.ob_display, self->innerright,
-                    self->size.left + self->client->area.width, self->size.top,
-                    self->cbwidth_r, self->client->area.height);
+                        self->size.left + self->client->area.width,
+                        self->size.top, self->cbwidth_r,
+                        self->client->area.height);
 
                 XMapWindow(plugin.ob_display, self->innerright);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->innerright);
+                XUnmapWindow(plugin.ob_display, self->innerright);
 
-            if (self->cbwidth_r && innercornerheight > 0)
-              {
+            if (self->cbwidth_r && innercornerheight > 0) {
                 XMoveResizeWindow(plugin.ob_display, self->innerbrr, 0,
-                    self->client->area.height
-                        - (theme_config.grip_width
-                            - self->size.bottom), self->cbwidth_r,
-                            theme_config.grip_width - self->size.bottom);
+                        self->client->area.height - (theme_config.grip_width
+                                - self->size.bottom), self->cbwidth_r,
+                        theme_config.grip_width - self->size.bottom);
 
                 XMapWindow(plugin.ob_display, self->innerbrr);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->innerbrr);
+                XUnmapWindow(plugin.ob_display, self->innerbrr);
 
-            if (self->cbwidth_t)
-              {
+            if (self->cbwidth_t) {
                 XMoveResizeWindow(plugin.ob_display, self->innertop,
-                    self->size.left - self->cbwidth_l, self->size.top
-                        - self->cbwidth_t, self->client->area.width
-                        + self->cbwidth_l + self->cbwidth_r, self->cbwidth_t);
+                        self->size.left - self->cbwidth_l, self->size.top
+                                - self->cbwidth_t, self->client->area.width
+                                + self->cbwidth_l + self->cbwidth_r,
+                        self->cbwidth_t);
 
                 XMapWindow(plugin.ob_display, self->innertop);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->innertop);
+                XUnmapWindow(plugin.ob_display, self->innertop);
 
-            if (self->cbwidth_b)
-              {
+            if (self->cbwidth_b) {
                 XMoveResizeWindow(plugin.ob_display, self->innerbottom,
-                    self->size.left - self->cbwidth_l, self->size.top
-                        + self->client->area.height, self->client->area.width
-                        + self->cbwidth_l + self->cbwidth_r, self->cbwidth_b);
+                        self->size.left - self->cbwidth_l, self->size.top
+                                + self->client->area.height,
+                        self->client->area.width + self->cbwidth_l
+                                + self->cbwidth_r, self->cbwidth_b);
 
-                XMoveResizeWindow(plugin.ob_display, self->innerblb, 0,
-                    0, theme_config.grip_width + self->bwidth,
-                    self->cbwidth_b);
+                XMoveResizeWindow(plugin.ob_display, self->innerblb, 0, 0,
+                        theme_config.grip_width + self->bwidth, self->cbwidth_b);
                 XMoveResizeWindow(plugin.ob_display, self->innerbrb,
-                    self->client->area.width + self->cbwidth_l
-                        + self->cbwidth_r
-                        - (theme_config.grip_width
-                            + self->bwidth), 0,
-                            theme_config.grip_width + self->bwidth,
-                    self->cbwidth_b);
+                        self->client->area.width + self->cbwidth_l
+                                + self->cbwidth_r - (theme_config.grip_width
+                                + self->bwidth), 0, theme_config.grip_width
+                                + self->bwidth, self->cbwidth_b);
 
                 XMapWindow(plugin.ob_display, self->innerbottom);
                 XMapWindow(plugin.ob_display, self->innerblb);
                 XMapWindow(plugin.ob_display, self->innerbrb);
-              }
-            else
-              {
+            }
+            else {
                 XUnmapWindow(plugin.ob_display, self->innerbottom);
                 XUnmapWindow(plugin.ob_display, self->innerblb);
                 XUnmapWindow(plugin.ob_display, self->innerbrb);
-              }
+            }
 
-            if (self->bwidth)
-              {
+            if (self->bwidth) {
                 gint titlesides;
 
                 /* height of titleleft and titleright */
-                titlesides
-                    = (!self->max_horz ? theme_config.grip_width
-                        : 0);
+                titlesides = (!self->max_horz ? theme_config.grip_width : 0);
 
                 XMoveResizeWindow(plugin.ob_display, self->titletop,
-                    theme_config.grip_width + self->bwidth, 0,
-                    /* width + bwidth*2 - bwidth*2 - grips*2 */
-                    self->width - theme_config.grip_width * 2,
-                    self->bwidth);
-                XMoveResizeWindow(plugin.ob_display,
-                    self->titletopleft, 0, 0,
-                    theme_config.grip_width + self->bwidth,
-                    self->bwidth);
-                XMoveResizeWindow(
-                    plugin.ob_display,
-                    self->titletopright,
-                    self->client->area.width + self->size.left
-                        + self->size.right
-                        - theme_config.grip_width - self->bwidth,
-                    0, theme_config.grip_width + self->bwidth,
-                    self->bwidth);
-
-                if (titlesides > 0)
-                  {
-                    XMoveResizeWindow(plugin.ob_display,
-                        self->titleleft, 0, self->bwidth, self->bwidth,
-                        titlesides);
-                    XMoveResizeWindow(plugin.ob_display,
-                        self->titleright,
+                        theme_config.grip_width + self->bwidth, 0,
+                        /* width + bwidth*2 - bwidth*2 - grips*2 */
+                        self->width - theme_config.grip_width * 2, self->bwidth);
+                XMoveResizeWindow(plugin.ob_display, self->titletopleft, 0, 0,
+                        theme_config.grip_width + self->bwidth, self->bwidth);
+                XMoveResizeWindow(plugin.ob_display, self->titletopright,
                         self->client->area.width + self->size.left
-                            + self->size.right - self->bwidth, self->bwidth,
-                        self->bwidth, titlesides);
+                                + self->size.right - theme_config.grip_width
+                                - self->bwidth, 0, theme_config.grip_width
+                                + self->bwidth, self->bwidth);
+
+                if (titlesides > 0) {
+                    XMoveResizeWindow(plugin.ob_display, self->titleleft, 0,
+                            self->bwidth, self->bwidth, titlesides);
+                    XMoveResizeWindow(plugin.ob_display, self->titleright,
+                            self->client->area.width + self->size.left
+                                    + self->size.right - self->bwidth,
+                            self->bwidth, self->bwidth, titlesides);
 
                     XMapWindow(plugin.ob_display, self->titleleft);
                     XMapWindow(plugin.ob_display, self->titleright);
-                  }
-                else
-                  {
+                }
+                else {
                     XUnmapWindow(plugin.ob_display, self->titleleft);
                     XUnmapWindow(plugin.ob_display, self->titleright);
-                  }
+                }
 
                 XMapWindow(plugin.ob_display, self->titletop);
                 XMapWindow(plugin.ob_display, self->titletopleft);
                 XMapWindow(plugin.ob_display, self->titletopright);
 
-                if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-                  {
-                    XMoveResizeWindow(
-                        plugin.ob_display,
-                        self->titlebottom,
-                        (self->max_horz ? 0 : self->bwidth),
-                        theme_config.title_height + self->bwidth,
-                        self->width, self->bwidth);
+                if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
+                    XMoveResizeWindow(plugin.ob_display, self->titlebottom,
+                            (self->max_horz ? 0 : self->bwidth),
+                            theme_config.title_height + self->bwidth,
+                            self->width, self->bwidth);
 
                     XMapWindow(plugin.ob_display, self->titlebottom);
-                  }
+                }
                 else
-                  XUnmapWindow(plugin.ob_display, self->titlebottom);
-              }
-            else
-              {
+                    XUnmapWindow(plugin.ob_display, self->titlebottom);
+            }
+            else {
                 XUnmapWindow(plugin.ob_display, self->titlebottom);
 
                 XUnmapWindow(plugin.ob_display, self->titletop);
@@ -607,187 +551,165 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
                 XUnmapWindow(plugin.ob_display, self->titletopright);
                 XUnmapWindow(plugin.ob_display, self->titleleft);
                 XUnmapWindow(plugin.ob_display, self->titleright);
-              }
+            }
 
-            if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-              {
+            if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
                 XMoveResizeWindow(plugin.ob_display, self->title,
-                    (self->max_horz ? 0 : self->bwidth), self->bwidth,
-                    self->width, theme_config.title_height);
+                        (self->max_horz ? 0 : self->bwidth), self->bwidth,
+                        self->width, theme_config.title_height);
 
                 XMapWindow(plugin.ob_display, self->title);
 
-                if (self->decorations & OB_FRAME_DECOR_GRIPS)
-                  {
-                    XMoveResizeWindow(plugin.ob_display,
-                        self->topresize,
-                        theme_config.grip_width, 0, self->width
-                            - theme_config.grip_width *2,
+                if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+                    XMoveResizeWindow(plugin.ob_display, self->topresize,
+                            theme_config.grip_width, 0, self->width
+                                    - theme_config.grip_width *2,
                             theme_config.paddingy + 1);
 
-                    XMoveWindow(plugin.ob_display, self->tltresize, 0,
-                        0);
-                    XMoveWindow(plugin.ob_display, self->tllresize, 0,
-                        0);
-                    XMoveWindow(plugin.ob_display, self->trtresize,
-                        self->width - theme_config.grip_width, 0);
-                    XMoveWindow(plugin.ob_display, self->trrresize,
-                        self->width - theme_config.paddingx - 1,
-                        0);
+                    XMoveWindow(plugin.ob_display, self->tltresize, 0, 0);
+                    XMoveWindow(plugin.ob_display, self->tllresize, 0, 0);
+                    XMoveWindow(plugin.ob_display, self->trtresize, self->width
+                            - theme_config.grip_width, 0);
+                    XMoveWindow(plugin.ob_display, self->trrresize, self->width
+                            - theme_config.paddingx - 1, 0);
 
                     XMapWindow(plugin.ob_display, self->topresize);
                     XMapWindow(plugin.ob_display, self->tltresize);
                     XMapWindow(plugin.ob_display, self->tllresize);
                     XMapWindow(plugin.ob_display, self->trtresize);
                     XMapWindow(plugin.ob_display, self->trrresize);
-                  }
-                else
-                  {
+                }
+                else {
                     XUnmapWindow(plugin.ob_display, self->topresize);
                     XUnmapWindow(plugin.ob_display, self->tltresize);
                     XUnmapWindow(plugin.ob_display, self->tllresize);
                     XUnmapWindow(plugin.ob_display, self->trtresize);
                     XUnmapWindow(plugin.ob_display, self->trrresize);
-                  }
-              }
+                }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->title);
-          }
+                XUnmapWindow(plugin.ob_display, self->title);
+        }
 
         if ((self->decorations & OB_FRAME_DECOR_TITLEBAR))
-          /* layout the title bar elements */
-          layout_title(self);
+            /* layout the title bar elements */
+            layout_title(self);
 
-        if (!fake)
-          {
+        if (!fake) {
             gint sidebwidth = self->max_horz ? 0 : self->bwidth;
 
-            if (self->bwidth && self->size.bottom)
-              {
-                XMoveResizeWindow(plugin.ob_display,
-                    self->handlebottom, theme_config.grip_width
-                        + self->bwidth + sidebwidth, self->size.top
-                        + self->client->area.height + self->size.bottom
-                        - self->bwidth, self->width
-                        - (theme_config.grip_width + sidebwidth)
-                            * 2, self->bwidth);
-
-                if (sidebwidth)
-                  {
-                    XMoveResizeWindow(
-                        plugin.ob_display,
-                        self->lgripleft,
-                        0,
+            if (self->bwidth && self->size.bottom) {
+                XMoveResizeWindow(plugin.ob_display, self->handlebottom,
+                        theme_config.grip_width + self->bwidth + sidebwidth,
                         self->size.top + self->client->area.height
-                            + self->size.bottom
-                            - (!self->max_horz ? theme_config.grip_width
-                                : self->size.bottom - self->cbwidth_b),
-                        self->bwidth,
-                        (!self->max_horz ? theme_config.grip_width
-                            : self->size.bottom - self->cbwidth_b));
+                                + self->size.bottom - self->bwidth, self->width
+                                - (theme_config.grip_width + sidebwidth) * 2,
+                        self->bwidth);
+
+                if (sidebwidth) {
                     XMoveResizeWindow(
-                        plugin.ob_display,
-                        self->rgripright,
-                        self->size.left + self->client->area.width
-                            + self->size.right - self->bwidth,
-                        self->size.top + self->client->area.height
-                            + self->size.bottom
-                            - (!self->max_horz ? theme_config.grip_width
-                                : self->size.bottom - self->cbwidth_b),
-                        self->bwidth,
-                        (!self->max_horz ? theme_config.grip_width
-                            : self->size.bottom - self->cbwidth_b));
+                            plugin.ob_display,
+                            self->lgripleft,
+                            0,
+                            self->size.top + self->client->area.height
+                                    + self->size.bottom
+                                    - (!self->max_horz ? theme_config.grip_width
+                                            : self->size.bottom
+                                                    - self->cbwidth_b),
+                            self->bwidth,
+                            (!self->max_horz ? theme_config.grip_width
+                                    : self->size.bottom - self->cbwidth_b));
+                    XMoveResizeWindow(
+                            plugin.ob_display,
+                            self->rgripright,
+                            self->size.left + self->client->area.width
+                                    + self->size.right - self->bwidth,
+                            self->size.top + self->client->area.height
+                                    + self->size.bottom
+                                    - (!self->max_horz ? theme_config.grip_width
+                                            : self->size.bottom
+                                                    - self->cbwidth_b),
+                            self->bwidth,
+                            (!self->max_horz ? theme_config.grip_width
+                                    : self->size.bottom - self->cbwidth_b));
 
                     XMapWindow(plugin.ob_display, self->lgripleft);
                     XMapWindow(plugin.ob_display, self->rgripright);
-                  }
-                else
-                  {
+                }
+                else {
                     XUnmapWindow(plugin.ob_display, self->lgripleft);
                     XUnmapWindow(plugin.ob_display, self->rgripright);
-                  }
+                }
 
                 XMoveResizeWindow(plugin.ob_display, self->lgripbottom,
-                    sidebwidth, self->size.top + self->client->area.height
-                        + self->size.bottom - self->bwidth,
-                        theme_config.grip_width + self->bwidth,
-                    self->bwidth);
+                        sidebwidth, self->size.top + self->client->area.height
+                                + self->size.bottom - self->bwidth,
+                        theme_config.grip_width + self->bwidth, self->bwidth);
                 XMoveResizeWindow(plugin.ob_display, self->rgripbottom,
-                    self->size.left + self->client->area.width
-                        + self->size.right - self->bwidth - sidebwidth
-                        - theme_config.grip_width,
-                    self->size.top + self->client->area.height
-                        + self->size.bottom - self->bwidth,
-                        theme_config.grip_width + self->bwidth,
-                    self->bwidth);
+                        self->size.left + self->client->area.width
+                                + self->size.right - self->bwidth - sidebwidth
+                                - theme_config.grip_width, self->size.top
+                                + self->client->area.height + self->size.bottom
+                                - self->bwidth, theme_config.grip_width
+                                + self->bwidth, self->bwidth);
 
                 XMapWindow(plugin.ob_display, self->handlebottom);
                 XMapWindow(plugin.ob_display, self->lgripbottom);
                 XMapWindow(plugin.ob_display, self->rgripbottom);
 
                 if (self->decorations & OB_FRAME_DECOR_HANDLE
-                    && theme_config.handle_height > 0)
-                  {
-                    XMoveResizeWindow(plugin.ob_display,
-                        self->handletop, theme_config.grip_width
-                            + self->bwidth + sidebwidth,
-                        FRAME_HANDLE_Y(self), self->width
-                            - (theme_config.grip_width
-                                + sidebwidth) * 2, self->bwidth);
+                        && theme_config.handle_height > 0) {
+                    XMoveResizeWindow(
+                            plugin.ob_display,
+                            self->handletop,
+                            theme_config.grip_width + self->bwidth + sidebwidth, 
+                            FRAME_HANDLE_Y(self), self->width
+                                    - (theme_config.grip_width + sidebwidth)
+                                            * 2, self->bwidth);
                     XMapWindow(plugin.ob_display, self->handletop);
 
-                    if (self->decorations & OB_FRAME_DECOR_GRIPS)
-                      {
-                        XMoveResizeWindow(plugin.ob_display,
-                            self->handleleft,
-                            theme_config.grip_width, 0,
-                            self->bwidth,
-                            theme_config.handle_height);
-                        XMoveResizeWindow(plugin.ob_display,
-                            self->handleright, self->width
-                                - theme_config.grip_width
-                                - self->bwidth, 0, self->bwidth,
+                    if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+                        XMoveResizeWindow(plugin.ob_display, self->handleleft,
+                                theme_config.grip_width, 0, self->bwidth,
+                                theme_config.handle_height);
+                        XMoveResizeWindow(plugin.ob_display, self->handleright,
+                                self->width - theme_config.grip_width
+                                        - self->bwidth, 0, self->bwidth,
                                 theme_config.handle_height);
 
-                        XMoveResizeWindow(plugin.ob_display,
-                            self->lgriptop, sidebwidth,
-                            FRAME_HANDLE_Y(self), theme_config.grip_width
-                                + self->bwidth, self->bwidth);
-                        XMoveResizeWindow(plugin.ob_display,
-                            self->rgriptop, self->size.left
-                                + self->client->area.width + self->size.right
-                                - self->bwidth - sidebwidth
-                                - theme_config.grip_width,
-                            FRAME_HANDLE_Y(self), theme_config.grip_width
-                                + self->bwidth, self->bwidth);
+                        XMoveResizeWindow(plugin.ob_display, self->lgriptop,
+                                sidebwidth, 
+                                FRAME_HANDLE_Y(self), theme_config.grip_width
+                                        + self->bwidth, self->bwidth);
+                        XMoveResizeWindow(plugin.ob_display, self->rgriptop,
+                                self->size.left + self->client->area.width
+                                        + self->size.right - self->bwidth
+                                        - sidebwidth - theme_config.grip_width, 
+                                FRAME_HANDLE_Y(self), theme_config.grip_width
+                                        + self->bwidth, self->bwidth);
 
                         XMapWindow(plugin.ob_display, self->handleleft);
                         XMapWindow(plugin.ob_display, self->handleright);
                         XMapWindow(plugin.ob_display, self->lgriptop);
                         XMapWindow(plugin.ob_display, self->rgriptop);
-                      }
-                    else
-                      {
-                        XUnmapWindow(plugin.ob_display,
-                            self->handleleft);
-                        XUnmapWindow(plugin.ob_display,
-                            self->handleright);
+                    }
+                    else {
+                        XUnmapWindow(plugin.ob_display, self->handleleft);
+                        XUnmapWindow(plugin.ob_display, self->handleright);
                         XUnmapWindow(plugin.ob_display, self->lgriptop);
                         XUnmapWindow(plugin.ob_display, self->rgriptop);
-                      }
-                  }
-                else
-                  {
+                    }
+                }
+                else {
                     XUnmapWindow(plugin.ob_display, self->handleleft);
                     XUnmapWindow(plugin.ob_display, self->handleright);
                     XUnmapWindow(plugin.ob_display, self->lgriptop);
                     XUnmapWindow(plugin.ob_display, self->rgriptop);
 
                     XUnmapWindow(plugin.ob_display, self->handletop);
-                  }
-              }
-            else
-              {
+                }
+            }
+            else {
                 XUnmapWindow(plugin.ob_display, self->handleleft);
                 XUnmapWindow(plugin.ob_display, self->handleright);
                 XUnmapWindow(plugin.ob_display, self->lgriptop);
@@ -800,285 +722,259 @@ void frame_adjust_area(gpointer _self, gboolean moved, gboolean resized,
                 XUnmapWindow(plugin.ob_display, self->rgripright);
                 XUnmapWindow(plugin.ob_display, self->lgripbottom);
                 XUnmapWindow(plugin.ob_display, self->rgripbottom);
-              }
+            }
 
             if (self->decorations & OB_FRAME_DECOR_HANDLE
-                && theme_config.handle_height > 0)
-              {
-                XMoveResizeWindow(plugin.ob_display, self->handle,
-                    sidebwidth,
-                    FRAME_HANDLE_Y(self) + self->bwidth, self->width,
-                    theme_config.handle_height);
+                    && theme_config.handle_height > 0) {
+                XMoveResizeWindow(plugin.ob_display, self->handle, sidebwidth, 
+                FRAME_HANDLE_Y(self) + self->bwidth, self->width,
+                        theme_config.handle_height);
                 XMapWindow(plugin.ob_display, self->handle);
 
-                if (self->decorations & OB_FRAME_DECOR_GRIPS)
-                  {
-                    XMoveResizeWindow(plugin.ob_display, self->lgrip,
-                        0, 0, theme_config.grip_width,
-                        theme_config.handle_height);
+                if (self->decorations & OB_FRAME_DECOR_GRIPS) {
+                    XMoveResizeWindow(plugin.ob_display, self->lgrip, 0, 0,
+                            theme_config.grip_width, theme_config.handle_height);
                     XMoveResizeWindow(plugin.ob_display, self->rgrip,
-                        self->width - theme_config.grip_width,
-                        0, theme_config.grip_width,
-                        theme_config.handle_height);
+                            self->width - theme_config.grip_width, 0,
+                            theme_config.grip_width, theme_config.handle_height);
 
                     XMapWindow(plugin.ob_display, self->lgrip);
                     XMapWindow(plugin.ob_display, self->rgrip);
-                  }
-                else
-                  {
+                }
+                else {
                     XUnmapWindow(plugin.ob_display, self->lgrip);
                     XUnmapWindow(plugin.ob_display, self->rgrip);
-                  }
-              }
-            else
-              {
+                }
+            }
+            else {
                 XUnmapWindow(plugin.ob_display, self->lgrip);
                 XUnmapWindow(plugin.ob_display, self->rgrip);
 
                 XUnmapWindow(plugin.ob_display, self->handle);
-              }
+            }
 
             if (self->bwidth && !self->max_horz && (self->client->area.height
-                + self->size.top + self->size.bottom)
-                > theme_config.grip_width * 2)
-              {
+                    + self->size.top + self->size.bottom)
+                    > theme_config.grip_width * 2) {
                 XMoveResizeWindow(plugin.ob_display, self->left, 0,
-                    self->bwidth + theme_config.grip_width,
-                    self->bwidth, self->client->area.height + self->size.top
-                        + self->size.bottom
-                        - theme_config.grip_width * 2);
+                        self->bwidth + theme_config.grip_width, self->bwidth,
+                        self->client->area.height + self->size.top
+                                + self->size.bottom - theme_config.grip_width
+                                * 2);
 
                 XMapWindow(plugin.ob_display, self->left);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->left);
+                XUnmapWindow(plugin.ob_display, self->left);
 
             if (self->bwidth && !self->max_horz && (self->client->area.height
-                + self->size.top + self->size.bottom)
-                > theme_config.grip_width * 2)
-              {
+                    + self->size.top + self->size.bottom)
+                    > theme_config.grip_width * 2) {
                 XMoveResizeWindow(plugin.ob_display, self->right,
-                    self->client->area.width + self->cbwidth_l
-                        + self->cbwidth_r + self->bwidth, self->bwidth
-                        + theme_config.grip_width, self->bwidth,
-                    self->client->area.height + self->size.top
-                        + self->size.bottom
-                        - theme_config.grip_width * 2);
+                        self->client->area.width + self->cbwidth_l
+                                + self->cbwidth_r + self->bwidth, self->bwidth
+                                + theme_config.grip_width, self->bwidth,
+                        self->client->area.height + self->size.top
+                                + self->size.bottom - theme_config.grip_width
+                                * 2);
 
                 XMapWindow(plugin.ob_display, self->right);
-              }
+            }
             else
-              XUnmapWindow(plugin.ob_display, self->right);
+                XUnmapWindow(plugin.ob_display, self->right);
 
             XMoveResizeWindow(plugin.ob_display, self->backback,
-                self->size.left, self->size.top, self->client->area.width,
-                self->client->area.height);
-          }
-      }
+                    self->size.left, self->size.top, self->client->area.width,
+                    self->client->area.height);
+        }
+    }
 
     /* shading can change without being moved or resized */
     RECT_SET_SIZE(self->area, self->client->area.width + self->size.left
-        + self->size.right,
-        (self->client->shaded ? theme_config.title_height
-            + self->bwidth * 2 : self->client->area.height + self->size.top
-            + self->size.bottom));
+            + self->size.right,
+            (self->client->shaded ? theme_config.title_height + self->bwidth
+                    * 2 : self->client->area.height + self->size.top
+                    + self->size.bottom));
 
-    if ((moved || resized) && !fake)
-      {
+    if ((moved || resized) && !fake) {
         /* find the new coordinates, done after setting the frame.size, for
          frame_client_gravity. */
         self->area.x = self->client->area.x;
         self->area.y = self->client->area.y;
         frame_client_gravity(self, &self->area.x, &self->area.y);
-      }
+    }
 
-    if (!fake)
-      {
+    if (!fake) {
         if (!frame_iconify_animating(self))
-          /* move and resize the top level frame.
-           shading can change without being moved or resized.
+            /* move and resize the top level frame.
+             shading can change without being moved or resized.
 
-           but don't do this during an iconify animation. it will be
-           reflected afterwards.
-           */
-          XMoveResizeWindow(plugin.ob_display, self->window,
-              self->area.x, self->area.y, self->area.width, self->area.height);
+             but don't do this during an iconify animation. it will be
+             reflected afterwards.
+             */
+            XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
+                    self->area.y, self->area.width, self->area.height);
 
         /* when the client has StaticGravity, it likes to move around.
          also this correctly positions the client when it maps.
          this also needs to be run when the frame's decorations sizes change!
          */
-        XMoveWindow(plugin.ob_display, self->client->window,
-            self->size.left, self->size.top);
+        XMoveWindow(plugin.ob_display, self->client->window, self->size.left,
+                self->size.top);
 
-        if (resized)
-          {
+        if (resized) {
             self->need_render = TRUE;
             framerender_frame(self);
             frame_adjust_shape(self);
-          }
+        }
 
-        if (!STRUT_EQUAL(self->size, oldsize))
-          {
+        if (!STRUT_EQUAL(self->size, oldsize)) {
             gulong vals[4];
             vals[0] = self->size.left;
             vals[1] = self->size.right;
             vals[2] = self->size.top;
             vals[3] = self->size.bottom;
             PROP_SETA32(self->client->window, net_frame_extents, cardinal,
-                vals, 4);
+                    vals, 4);
             PROP_SETA32(self->client->window, kde_net_wm_frame_strut, cardinal,
-                vals, 4);
-          }
+                    vals, 4);
+        }
 
         /* if this occurs while we are focus cycling, the indicator needs to
          match the changes */
         if (plugin.focus_cycle_target == self->client)
-          focus_cycle_draw_indicator(self->client);
-      }
+            focus_cycle_draw_indicator(self->client);
+    }
     if (resized && (self->decorations & OB_FRAME_DECOR_TITLEBAR))
-      XResizeWindow(plugin.ob_display, self->label, self->label_width,
-          theme_config.label_height);
+        XResizeWindow(plugin.ob_display, self->label, self->label_width,
+                theme_config.label_height);
 
-  }
+}
 
 void frame_adjust_cursors(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     if ((self->functions & OB_CLIENT_FUNC_RESIZE) != (self->client->functions
-        & OB_CLIENT_FUNC_RESIZE) || self->max_horz != self->client->max_horz
-        || self->max_vert != self->client->max_vert || self->shaded
-        != self->client->shaded)
-      {
+            & OB_CLIENT_FUNC_RESIZE) || self->max_horz
+            != self->client->max_horz || self->max_vert
+            != self->client->max_vert || self->shaded != self->client->shaded) {
         gboolean r = (self->client->functions & OB_CLIENT_FUNC_RESIZE)
-            && !(self->client->max_horz && self->client->max_vert);
+                && !(self->client->max_horz && self->client->max_vert);
         gboolean topbot = !self->client->max_vert;
         gboolean sh = self->client->shaded;
         XSetWindowAttributes a;
 
         /* these ones turn off when max vert, and some when shaded */
         a.cursor = ob_cursor(r && topbot && !sh ? OB_CURSOR_NORTH
-            : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->topresize,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->titletop,
-            CWCursor, &a);
+                : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->topresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->titletop, CWCursor, &a);
         a.cursor = ob_cursor(r && topbot ? OB_CURSOR_SOUTH : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->handle,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->handletop,
-            CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handle, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handletop, CWCursor,
+                &a);
         XChangeWindowAttributes(plugin.ob_display, self->handlebottom,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerbottom,
-            CWCursor, &a);
+                CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbottom, CWCursor,
+                &a);
 
         /* these ones change when shaded */
         a.cursor = ob_cursor(r ? (sh ? OB_CURSOR_WEST : OB_CURSOR_NORTHWEST)
-            : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->titleleft,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->tltresize,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->tllresize,
-            CWCursor, &a);
+                : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->titleleft, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->tltresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->tllresize, CWCursor,
+                &a);
         XChangeWindowAttributes(plugin.ob_display, self->titletopleft,
-            CWCursor, &a);
+                CWCursor, &a);
         a.cursor = ob_cursor(r ? (sh ? OB_CURSOR_EAST : OB_CURSOR_NORTHEAST)
-            : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->titleright,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->trtresize,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->trrresize,
-            CWCursor, &a);
+                : OB_CURSOR_NONE);
+        XChangeWindowAttributes(plugin.ob_display, self->titleright, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->trtresize, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->trrresize, CWCursor,
+                &a);
         XChangeWindowAttributes(plugin.ob_display, self->titletopright,
-            CWCursor, &a);
+                CWCursor, &a);
 
         /* these ones are pretty static */
         a.cursor = ob_cursor(r ? OB_CURSOR_WEST : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->left,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerleft,
-            CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->left, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerleft, CWCursor,
+                &a);
         a.cursor = ob_cursor(r ? OB_CURSOR_EAST : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->right,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerright,
-            CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->right, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerright, CWCursor,
+                &a);
         a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHWEST : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->lgrip,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->handleleft,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->lgripleft,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->lgriptop,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->lgripbottom,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerbll,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerblb,
-            CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgrip, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handleleft, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgripleft, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgriptop, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->lgripbottom, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbll, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerblb, CWCursor, &a);
         a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHEAST : OB_CURSOR_NONE);
-        XChangeWindowAttributes(plugin.ob_display, self->rgrip,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->handleright,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->rgripright,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->rgriptop,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->rgripbottom,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerbrr,
-            CWCursor, &a);
-        XChangeWindowAttributes(plugin.ob_display, self->innerbrb,
-            CWCursor, &a);
-      }
-  }
+        XChangeWindowAttributes(plugin.ob_display, self->rgrip, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->handleright, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->rgripright, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->rgriptop, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->rgripbottom, CWCursor,
+                &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbrr, CWCursor, &a);
+        XChangeWindowAttributes(plugin.ob_display, self->innerbrb, CWCursor, &a);
+    }
+}
 
 void frame_adjust_client_area(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     /* adjust the window which is there to prevent flashing on unmap */
     XMoveResizeWindow(plugin.ob_display, self->backfront, 0, 0,
-        self->client->area.width, self->client->area.height);
-  }
+            self->client->area.width, self->client->area.height);
+}
 
 void frame_adjust_state(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     self->need_render = TRUE;
     framerender_frame(self);
-  }
+}
 
 void frame_adjust_focus(gpointer _self, gboolean hilite)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     self->focused = hilite;
     self->need_render = TRUE;
     framerender_frame(self);
     XFlush(plugin.ob_display);
-  }
+}
 
 void frame_adjust_title(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     self->need_render = TRUE;
     framerender_frame(self);
-  }
+}
 
 void frame_adjust_icon(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     self->need_render = TRUE;
     framerender_frame(self);
-  }
+}
 
 void frame_grab_client(gpointer _self, GHashTable * window_map)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     /* DO NOT map the client window here. we used to do that, but it is bogus.
      we need to set up the client's dimensions and everything before we
@@ -1086,8 +982,7 @@ void frame_grab_client(gpointer _self, GHashTable * window_map)
      */
 
     /* reparent the client to the frame */
-    XReparentWindow(plugin.ob_display, self->client->window,
-        self->window, 0, 0);
+    XReparentWindow(plugin.ob_display, self->client->window, self->window, 0, 0);
 
     /*
      When reparenting the client window, it is usually not mapped yet, since
@@ -1096,7 +991,7 @@ void frame_grab_client(gpointer _self, GHashTable * window_map)
      for it.
      */
     if (ob_state() == OB_STATE_STARTING)
-      ++self->client->ignore_unmaps;
+        ++self->client->ignore_unmaps;
 
     /* select the event mask on the client's parent (to receive config/map
      req's) the ButtonPress is to catch clicks on the client border */
@@ -1144,22 +1039,21 @@ void frame_grab_client(gpointer _self, GHashTable * window_map)
     g_hash_table_insert(window_map, &self->rgripright, self->client);
     g_hash_table_insert(window_map, &self->rgriptop, self->client);
     g_hash_table_insert(window_map, &self->rgripbottom, self->client);
-  }
+}
 
 void frame_release_client(gpointer _self, GHashTable * window_map)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     XEvent ev;
     gboolean reparent = TRUE;
 
     /* if there was any animation going on, kill it */
     ob_main_loop_timeout_remove_data(plugin.ob_main_loop,
-        frame_animate_iconify, self, FALSE);
+            frame_animate_iconify, self, FALSE);
 
     /* check if the app has already reparented its window away */
-    while (XCheckTypedWindowEvent(plugin.ob_display,
-        self->client->window, ReparentNotify, &ev))
-      {
+    while (XCheckTypedWindowEvent(plugin.ob_display, self->client->window,
+            ReparentNotify, &ev)) {
         /* This check makes sure we don't catch our own reparent action to
          our frame window. This doesn't count as the app reparenting itself
          away of course.
@@ -1167,22 +1061,20 @@ void frame_release_client(gpointer _self, GHashTable * window_map)
          Reparent events that are generated by us are just discarded here.
          They are of no consequence to us anyhow.
          */
-        if (ev.xreparent.parent != self->window)
-          {
+        if (ev.xreparent.parent != self->window) {
             reparent = FALSE;
             XPutBackEvent(plugin.ob_display, &ev);
             break;
-          }
-      }
+        }
+    }
 
-    if (reparent)
-      {
+    if (reparent) {
         /* according to the ICCCM - if the client doesn't reparent itself,
          then we will reparent the window to root for them */
-        XReparentWindow(plugin.ob_display, self->client->window,
-            RootWindow(plugin.ob_display, plugin.ob_screen),
-            self->client->area.x, self->client->area.y);
-      }
+        XReparentWindow(plugin.ob_display, self->client->window, RootWindow(
+                plugin.ob_display, plugin.ob_screen), self->client->area.x,
+                self->client->area.y);
+    }
 
     /* remove all the windows for the frame from the window_map */
     g_hash_table_remove(window_map, &self->window);
@@ -1227,43 +1119,42 @@ void frame_release_client(gpointer _self, GHashTable * window_map)
     g_hash_table_remove(window_map, &self->rgriptop);
     g_hash_table_remove(window_map, &self->rgripbottom);
 
-    ob_main_loop_timeout_remove_data(plugin.ob_main_loop,
-        flash_timeout, self, TRUE);
-  }
+    ob_main_loop_timeout_remove_data(plugin.ob_main_loop, flash_timeout, self,
+            TRUE);
+}
 
 /* is there anything present between us and the label? */
-static gboolean is_button_present(ObDefaultFrame *_self, const gchar *lc, gint dir)
-  {
+static gboolean is_button_present(ObDefaultFrame *_self, const gchar *lc,
+        gint dir)
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
-    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir)
-      {
+    for (; *lc != '\0' && lc >= plugin.config_title_layout; lc += dir) {
         if (*lc == ' ')
-          continue; /* it was invalid */
+            continue; /* it was invalid */
         if (*lc == 'N' && self->decorations & OB_FRAME_DECOR_ICON)
-          return TRUE;
+            return TRUE;
         if (*lc == 'D' && self->decorations & OB_FRAME_DECOR_ALLDESKTOPS)
-          return TRUE;
+            return TRUE;
         if (*lc == 'S' && self->decorations & OB_FRAME_DECOR_SHADE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'I' && self->decorations & OB_FRAME_DECOR_ICONIFY)
-          return TRUE;
+            return TRUE;
         if (*lc == 'M' && self->decorations & OB_FRAME_DECOR_MAXIMIZE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'C' && self->decorations & OB_FRAME_DECOR_CLOSE)
-          return TRUE;
+            return TRUE;
         if (*lc == 'L')
-          return FALSE;
-      }
+            return FALSE;
+    }
     return FALSE;
-  }
+}
 
 void layout_title(ObDefaultFrame * self)
-  {
+{
     gchar *lc;
     gint i;
 
-    const gint bwidth = theme_config.button_size
-        + theme_config.paddingx + 1;
+    const gint bwidth = theme_config.button_size + theme_config.paddingx + 1;
     /* position of the left most button */
     const gint left = theme_config.paddingx + 1;
     /* position of the right most button */
@@ -1271,9 +1162,8 @@ void layout_title(ObDefaultFrame * self)
 
     /* turn them all off */
     self->icon_on = self->desk_on = self->shade_on = self->iconify_on
-        = self->max_on = self->close_on = self->label_on = FALSE;
-    self->label_width = self->width
-        - (theme_config.paddingx + 1) * 2;
+            = self->max_on = self->close_on = self->label_on = FALSE;
+    self->label_width = self->width - (theme_config.paddingx + 1) * 2;
     self->leftmost = self->rightmost = OB_FRAME_CONTEXT_NONE;
 
     /* figure out what's being show, find each element's position, and the
@@ -1282,554 +1172,518 @@ void layout_title(ObDefaultFrame * self)
      do the ones before the label, then after the label,
      i will be +1 the first time through when working to the left,
      and -1 the second time through when working to the right */
-    for (i = 1; i >= -1; i-=2)
-      {
+    for (i = 1; i >= -1; i-=2) {
         gint x;
         ObFrameContext *firstcon;
 
-        if (i > 0)
-          {
+        if (i > 0) {
             x = left;
             lc = plugin.config_title_layout;
             firstcon = &self->leftmost;
-          }
-        else
-          {
+        }
+        else {
             x = right;
             lc = plugin.config_title_layout
-                + strlen(plugin.config_title_layout)-1;
+                    + strlen(plugin.config_title_layout)-1;
             firstcon = &self->rightmost;
-          }
+        }
 
         /* stop at the end of the string (or the label, which calls break) */
-        for (; *lc != '\0' && lc >= plugin.config_title_layout; lc+=i)
-          {
-            if (*lc == 'L')
-              {
-                if (i > 0)
-                  {
+        for (; *lc != '\0' && lc >= plugin.config_title_layout; lc+=i) {
+            if (*lc == 'L') {
+                if (i > 0) {
                     self->label_on = TRUE;
                     self->label_x = x;
-                  }
+                }
                 break; /* break the for loop, do other side of label */
-              }
-            else if (*lc == 'N')
-              {
+            }
+            else if (*lc == 'N') {
                 if (firstcon)
-                  *firstcon = OB_FRAME_CONTEXT_ICON;
-                if ((self->icon_on = is_button_present(self, lc, i)))
-                  {
+                    *firstcon = OB_FRAME_CONTEXT_ICON;
+                if ((self->icon_on = is_button_present(self, lc, i))) {
                     /* icon is bigger than buttons */
                     self->label_width -= bwidth + 2;
                     if (i > 0)
-                      self->icon_x = x;
+                        self->icon_x = x;
                     x += i * (bwidth + 2);
                     if (i < 0)
-                      self->icon_x = x;
-                  }
-              }
-            else if (*lc == 'D')
-              {
+                        self->icon_x = x;
+                }
+            }
+            else if (*lc == 'D') {
                 if (firstcon)
-                  *firstcon = OB_FRAME_CONTEXT_ALLDESKTOPS;
-                if ((self->desk_on = is_button_present(self, lc, i)))
-                  {
+                    *firstcon = OB_FRAME_CONTEXT_ALLDESKTOPS;
+                if ((self->desk_on = is_button_present(self, lc, i))) {
                     self->label_width -= bwidth;
                     if (i > 0)
-                      self->desk_x = x;
+                        self->desk_x = x;
                     x += i * bwidth;
                     if (i < 0)
-                      self->desk_x = x;
-                  }
-              }
-            else if (*lc == 'S')
-              {
+                        self->desk_x = x;
+                }
+            }
+            else if (*lc == 'S') {
                 if (firstcon)
-                  *firstcon = OB_FRAME_CONTEXT_SHADE;
-                if ((self->shade_on = is_button_present(self, lc, i)))
-                  {
+                    *firstcon = OB_FRAME_CONTEXT_SHADE;
+                if ((self->shade_on = is_button_present(self, lc, i))) {
                     self->label_width -= bwidth;
                     if (i > 0)
-                      self->shade_x = x;
+                        self->shade_x = x;
                     x += i * bwidth;
                     if (i < 0)
-                      self->shade_x = x;
-                  }
-              }
-            else if (*lc == 'I')
-              {
+                        self->shade_x = x;
+                }
+            }
+            else if (*lc == 'I') {
                 if (firstcon)
-                  *firstcon = OB_FRAME_CONTEXT_ICONIFY;
-                if ((self->iconify_on = is_button_present(self, lc, i)))
-                  {
+                    *firstcon = OB_FRAME_CONTEXT_ICONIFY;
+                if ((self->iconify_on = is_button_present(self, lc, i))) {
                     self->label_width -= bwidth;
                     if (i > 0)
-                      self->iconify_x = x;
+                        self->iconify_x = x;
                     x += i * bwidth;
                     if (i < 0)
-                      self->iconify_x = x;
-                  }
-              }
-            else if (*lc == 'M')
-              {
+                        self->iconify_x = x;
+                }
+            }
+            else if (*lc == 'M') {
                 if (firstcon)
-                  *firstcon = OB_FRAME_CONTEXT_MAXIMIZE;
-                if ((self->max_on = is_button_present(self, lc, i)))
-                  {
+                    *firstcon = OB_FRAME_CONTEXT_MAXIMIZE;
+                if ((self->max_on = is_button_present(self, lc, i))) {
                     self->label_width -= bwidth;
                     if (i > 0)
-                      self->max_x = x;
+                        self->max_x = x;
                     x += i * bwidth;
                     if (i < 0)
-                      self->max_x = x;
-                  }
-              }
-            else if (*lc == 'C')
-              {
+                        self->max_x = x;
+                }
+            }
+            else if (*lc == 'C') {
                 if (firstcon)
-                  *firstcon = OB_FRAME_CONTEXT_CLOSE;
-                if ((self->close_on = is_button_present(self, lc, i)))
-                  {
+                    *firstcon = OB_FRAME_CONTEXT_CLOSE;
+                if ((self->close_on = is_button_present(self, lc, i))) {
                     self->label_width -= bwidth;
                     if (i > 0)
-                      self->close_x = x;
+                        self->close_x = x;
                     x += i * bwidth;
                     if (i < 0)
-                      self->close_x = x;
-                  }
-              }
+                        self->close_x = x;
+                }
+            }
             else
-              continue; /* don't set firstcon */
+                continue; /* don't set firstcon */
             firstcon = NULL;
-          }
-      }
+        }
+    }
 
     /* position and map the elements */
-    if (self->icon_on)
-      {
+    if (self->icon_on) {
         XMapWindow(plugin.ob_display, self->icon);
         XMoveWindow(plugin.ob_display, self->icon, self->icon_x,
-            theme_config.paddingy);
-      }
+                theme_config.paddingy);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->icon);
+        XUnmapWindow(plugin.ob_display, self->icon);
 
-    if (self->desk_on)
-      {
+    if (self->desk_on) {
         XMapWindow(plugin.ob_display, self->desk);
         XMoveWindow(plugin.ob_display, self->desk, self->desk_x,
-            theme_config.paddingy + 1);
-      }
+                theme_config.paddingy + 1);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->desk);
+        XUnmapWindow(plugin.ob_display, self->desk);
 
-    if (self->shade_on)
-      {
+    if (self->shade_on) {
         XMapWindow(plugin.ob_display, self->shade);
         XMoveWindow(plugin.ob_display, self->shade, self->shade_x,
-            theme_config.paddingy + 1);
-      }
+                theme_config.paddingy + 1);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->shade);
+        XUnmapWindow(plugin.ob_display, self->shade);
 
-    if (self->iconify_on)
-      {
+    if (self->iconify_on) {
         XMapWindow(plugin.ob_display, self->iconify);
         XMoveWindow(plugin.ob_display, self->iconify, self->iconify_x,
-            theme_config.paddingy + 1);
-      }
+                theme_config.paddingy + 1);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->iconify);
+        XUnmapWindow(plugin.ob_display, self->iconify);
 
-    if (self->max_on)
-      {
+    if (self->max_on) {
         XMapWindow(plugin.ob_display, self->max);
         XMoveWindow(plugin.ob_display, self->max, self->max_x,
-            theme_config.paddingy + 1);
-      }
+                theme_config.paddingy + 1);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->max);
+        XUnmapWindow(plugin.ob_display, self->max);
 
-    if (self->close_on)
-      {
+    if (self->close_on) {
         XMapWindow(plugin.ob_display, self->close);
         XMoveWindow(plugin.ob_display, self->close, self->close_x,
-            theme_config.paddingy + 1);
-      }
+                theme_config.paddingy + 1);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->close);
+        XUnmapWindow(plugin.ob_display, self->close);
 
-    if (self->label_on)
-      {
+    if (self->label_on) {
         self->label_width = MAX(1, self->label_width); /* no lower than 1 */
         XMapWindow(plugin.ob_display, self->label);
         XMoveWindow(plugin.ob_display, self->label, self->label_x,
-            theme_config.paddingy);
-      }
+                theme_config.paddingy);
+    }
     else
-      XUnmapWindow(plugin.ob_display, self->label);
-  }
+        XUnmapWindow(plugin.ob_display, self->label);
+}
 
 ObFrameContext frame_context(gpointer _self, Window win, gint x, gint y)
-  {
+{
     ObDefaultFrame * self = OBDEFAULTFRAME(_self);
 
     /* when the user clicks in the corners of the titlebar and the client
      is fully maximized, then treat it like they clicked in the
      button that is there */
     if (self->max_horz && self->max_vert && (win == self->title || win
-        == self->titletop || win == self->titleleft || win
-        == self->titletopleft || win == self->titleright || win
-        == self->titletopright))
-      {
+            == self->titletop || win == self->titleleft || win
+            == self->titletopleft || win == self->titleright || win
+            == self->titletopright)) {
         /* get the mouse coords in reference to the whole frame */
         gint fx = x;
         gint fy = y;
 
         /* these windows are down a border width from the top of the frame */
         if (win == self->title || win == self->titleleft || win
-            == self->titleright)
-          fy += self->bwidth;
+                == self->titleright)
+            fy += self->bwidth;
 
         /* title is a border width in from the edge */
         if (win == self->title)
-          fx += self->bwidth;
+            fx += self->bwidth;
         /* titletop is a bit to the right */
         else if (win == self->titletop)
-          fx += theme_config.grip_width + self->bwidth;
+            fx += theme_config.grip_width + self->bwidth;
         /* titletopright is way to the right edge */
         else if (win == self->titletopright)
-          fx += self->area.width - (theme_config.grip_width
-              + self->bwidth);
+            fx += self->area.width - (theme_config.grip_width + self->bwidth);
         /* titleright is even more way to the right edge */
         else if (win == self->titleright)
-          fx += self->area.width - self->bwidth;
+            fx += self->area.width - self->bwidth;
 
         /* figure out if we're over the area that should be considered a
          button */
         if (fy < self->bwidth + theme_config.paddingy + 1
-            + theme_config.button_size)
-          {
+                + theme_config.button_size) {
             if (fx < (self->bwidth + theme_config.paddingx + 1
-                + theme_config.button_size))
-              {
+                    + theme_config.button_size)) {
                 if (self->leftmost != OB_FRAME_CONTEXT_NONE)
-                  return self->leftmost;
-              }
+                    return self->leftmost;
+            }
             else if (fx >= (self->area.width - (self->bwidth
-                + theme_config.paddingx + 1
-                + theme_config.button_size)))
-              {
+                    + theme_config.paddingx + 1 + theme_config.button_size))) {
                 if (self->rightmost != OB_FRAME_CONTEXT_NONE)
-                  return self->rightmost;
-              }
-          }
+                    return self->rightmost;
+            }
+        }
 
         /* there is no resizing maximized windows so make them the titlebar
          context */
         return OB_FRAME_CONTEXT_TITLEBAR;
-      }
+    }
     else if (self->max_vert
-        && (win == self->titletop || win == self->topresize))
-      /* can't resize vertically when max vert */
-      return OB_FRAME_CONTEXT_TITLEBAR;
+            && (win == self->titletop || win == self->topresize))
+        /* can't resize vertically when max vert */
+        return OB_FRAME_CONTEXT_TITLEBAR;
     else if (self->shaded && (win == self->titletop || win == self->topresize))
-      /* can't resize vertically when shaded */
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        /* can't resize vertically when shaded */
+        return OB_FRAME_CONTEXT_TITLEBAR;
 
     if (win == self->window)
-      return OB_FRAME_CONTEXT_FRAME;
+        return OB_FRAME_CONTEXT_FRAME;
     if (win == self->label)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
     if (win == self->handle)
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
     if (win == self->handletop)
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
     if (win == self->handlebottom)
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
     if (win == self->handleleft)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->lgrip)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->lgripleft)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->lgriptop)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->lgripbottom)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->handleright)
-      return OB_FRAME_CONTEXT_BRCORNER;
+        return OB_FRAME_CONTEXT_BRCORNER;
     if (win == self->rgrip)
-      return OB_FRAME_CONTEXT_BRCORNER;
+        return OB_FRAME_CONTEXT_BRCORNER;
     if (win == self->rgripright)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->rgriptop)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->rgripbottom)
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     if (win == self->title)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
     if (win == self->titlebottom)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
     if (win == self->titleleft)
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
     if (win == self->titletopleft)
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
     if (win == self->titleright)
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
     if (win == self->titletopright)
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
     if (win == self->titletop)
-      return OB_FRAME_CONTEXT_TOP;
+        return OB_FRAME_CONTEXT_TOP;
     if (win == self->topresize)
-      return OB_FRAME_CONTEXT_TOP;
+        return OB_FRAME_CONTEXT_TOP;
     if (win == self->tltresize)
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
     if (win == self->tllresize)
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
     if (win == self->trtresize)
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
     if (win == self->trrresize)
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
     if (win == self->left)
-      return OB_FRAME_CONTEXT_LEFT;
+        return OB_FRAME_CONTEXT_LEFT;
     if (win == self->right)
-      return OB_FRAME_CONTEXT_RIGHT;
+        return OB_FRAME_CONTEXT_RIGHT;
     if (win == self->innertop)
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
     if (win == self->innerleft)
-      return OB_FRAME_CONTEXT_LEFT;
+        return OB_FRAME_CONTEXT_LEFT;
     if (win == self->innerbottom)
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
     if (win == self->innerright)
-      return OB_FRAME_CONTEXT_RIGHT;
+        return OB_FRAME_CONTEXT_RIGHT;
     if (win == self->max)
-      return OB_FRAME_CONTEXT_MAXIMIZE;
+        return OB_FRAME_CONTEXT_MAXIMIZE;
     if (win == self->iconify)
-      return OB_FRAME_CONTEXT_ICONIFY;
+        return OB_FRAME_CONTEXT_ICONIFY;
     if (win == self->close)
-      return OB_FRAME_CONTEXT_CLOSE;
+        return OB_FRAME_CONTEXT_CLOSE;
     if (win == self->icon)
-      return OB_FRAME_CONTEXT_ICON;
+        return OB_FRAME_CONTEXT_ICON;
     if (win == self->desk)
-      return OB_FRAME_CONTEXT_ALLDESKTOPS;
+        return OB_FRAME_CONTEXT_ALLDESKTOPS;
     if (win == self->shade)
-      return OB_FRAME_CONTEXT_SHADE;
+        return OB_FRAME_CONTEXT_SHADE;
 
     return OB_FRAME_CONTEXT_NONE;
-  }
+}
 
 void frame_client_gravity(gpointer _self, gint *x, gint *y)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     /* horizontal */
-    switch (self->client->gravity)
-      {
-      default:
-      case NorthWestGravity:
-      case SouthWestGravity:
-      case WestGravity:
+    switch (self->client->gravity) {
+    default:
+    case NorthWestGravity:
+    case SouthWestGravity:
+    case WestGravity:
         break;
 
-      case NorthGravity:
-      case SouthGravity:
-      case CenterGravity:
+    case NorthGravity:
+    case SouthGravity:
+    case CenterGravity:
         /* the middle of the client will be the middle of the frame */
         *x -= (self->size.right - self->size.left) / 2;
         break;
 
-      case NorthEastGravity:
-      case SouthEastGravity:
-      case EastGravity:
+    case NorthEastGravity:
+    case SouthEastGravity:
+    case EastGravity:
         /* the right side of the client will be the right side of the frame */
         *x -= self->size.right + self->size.left - self->client->border_width
-            * 2;
+                * 2;
         break;
 
-      case ForgetGravity:
-      case StaticGravity:
+    case ForgetGravity:
+    case StaticGravity:
         /* the client's position won't move */
         *x -= self->size.left - self->client->border_width;
         break;
-      }
+    }
 
     /* vertical */
-    switch (self->client->gravity)
-      {
-      default:
-      case NorthWestGravity:
-      case NorthEastGravity:
-      case NorthGravity:
+    switch (self->client->gravity) {
+    default:
+    case NorthWestGravity:
+    case NorthEastGravity:
+    case NorthGravity:
         break;
 
-      case CenterGravity:
-      case EastGravity:
-      case WestGravity:
+    case CenterGravity:
+    case EastGravity:
+    case WestGravity:
         /* the middle of the client will be the middle of the frame */
         *y -= (self->size.bottom - self->size.top) / 2;
         break;
 
-      case SouthWestGravity:
-      case SouthEastGravity:
-      case SouthGravity:
+    case SouthWestGravity:
+    case SouthEastGravity:
+    case SouthGravity:
         /* the bottom of the client will be the bottom of the frame */
         *y -= self->size.bottom + self->size.top - self->client->border_width
-            * 2;
+                * 2;
         break;
 
-      case ForgetGravity:
-      case StaticGravity:
+    case ForgetGravity:
+    case StaticGravity:
         /* the client's position won't move */
         *y -= self->size.top - self->client->border_width;
         break;
-      }
-  }
+    }
+}
 
 void frame_frame_gravity(gpointer _self, gint *x, gint *y)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     /* horizontal */
-    switch (self->client->gravity)
-      {
-      default:
-      case NorthWestGravity:
-      case WestGravity:
-      case SouthWestGravity:
+    switch (self->client->gravity) {
+    default:
+    case NorthWestGravity:
+    case WestGravity:
+    case SouthWestGravity:
         break;
-      case NorthGravity:
-      case CenterGravity:
-      case SouthGravity:
+    case NorthGravity:
+    case CenterGravity:
+    case SouthGravity:
         /* the middle of the client will be the middle of the frame */
         *x += (self->size.right - self->size.left) / 2;
         break;
-      case NorthEastGravity:
-      case EastGravity:
-      case SouthEastGravity:
+    case NorthEastGravity:
+    case EastGravity:
+    case SouthEastGravity:
         /* the right side of the client will be the right side of the frame */
         *x += self->size.right + self->size.left - self->client->border_width
-            * 2;
+                * 2;
         break;
-      case StaticGravity:
-      case ForgetGravity:
+    case StaticGravity:
+    case ForgetGravity:
         /* the client's position won't move */
         *x += self->size.left - self->client->border_width;
         break;
-      }
+    }
 
     /* vertical */
-    switch (self->client->gravity)
-      {
-      default:
-      case NorthWestGravity:
-      case NorthGravity:
-      case NorthEastGravity:
+    switch (self->client->gravity) {
+    default:
+    case NorthWestGravity:
+    case NorthGravity:
+    case NorthEastGravity:
         break;
-      case WestGravity:
-      case CenterGravity:
-      case EastGravity:
+    case WestGravity:
+    case CenterGravity:
+    case EastGravity:
         /* the middle of the client will be the middle of the frame */
         *y += (self->size.bottom - self->size.top) / 2;
         break;
-      case SouthWestGravity:
-      case SouthGravity:
-      case SouthEastGravity:
+    case SouthWestGravity:
+    case SouthGravity:
+    case SouthEastGravity:
         /* the bottom of the client will be the bottom of the frame */
         *y += self->size.bottom + self->size.top - self->client->border_width
-            * 2;
+                * 2;
         break;
-      case StaticGravity:
-      case ForgetGravity:
+    case StaticGravity:
+    case ForgetGravity:
         /* the client's position won't move */
         *y += self->size.top - self->client->border_width;
         break;
-      }
-  }
+    }
+}
 
 void frame_rect_to_frame(gpointer _self, Rect *r)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     r->width += self->size.left + self->size.right;
     r->height += self->size.top + self->size.bottom;
     frame_client_gravity(self, &r->x, &r->y);
-  }
+}
 
 void frame_rect_to_client(gpointer _self, Rect *r)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     r->width -= self->size.left + self->size.right;
     r->height -= self->size.top + self->size.bottom;
     frame_frame_gravity(self, &r->x, &r->y);
-  }
+}
 
 void flash_done(gpointer data)
-  {
+{
     ObDefaultFrame *self = data;
 
     if (self->focused != self->flash_on)
-      frame_adjust_focus(self, self->focused);
-  }
+        frame_adjust_focus(self, self->focused);
+}
 
 gboolean flash_timeout(gpointer data)
-  {
+{
     ObDefaultFrame *self = data;
     GTimeVal now;
 
     g_get_current_time(&now);
-    if (now.tv_sec > self->flash_end.tv_sec || (now.tv_sec
-        == self->flash_end.tv_sec && now.tv_usec >= self->flash_end.tv_usec))
-      self->flashing = FALSE;
+    if (now.tv_sec > self->flash_end.tv_sec
+            || (now.tv_sec == self->flash_end.tv_sec && now.tv_usec
+                    >= self->flash_end.tv_usec))
+        self->flashing = FALSE;
 
     if (!self->flashing)
-      return FALSE; /* we are done */
+        return FALSE; /* we are done */
 
     self->flash_on = !self->flash_on;
-    if (!self->focused)
-      {
+    if (!self->focused) {
         frame_adjust_focus(self, self->flash_on);
         self->focused = FALSE;
-      }
+    }
 
     return TRUE; /* go again */
-  }
+}
 
 void frame_flash_start(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     self->flash_on = self->focused;
 
     if (!self->flashing)
-      ob_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC
-          * 0.6, flash_timeout, self, g_direct_equal, flash_done);
+        ob_main_loop_timeout_add(plugin.ob_main_loop, G_USEC_PER_SEC * 0.6,
+                flash_timeout, self, g_direct_equal, flash_done);
     g_get_current_time(&self->flash_end);
     g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5);
 
     self->flashing = TRUE;
-  }
+}
 
 void frame_flash_stop(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     self->flashing = FALSE;
-  }
+}
 
 static gulong frame_animate_iconify_time_left(gpointer _self,
-    const GTimeVal *now)
-  {
+        const GTimeVal *now)
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     glong sec, usec;
     sec = self->iconify_animation_end.tv_sec - now->tv_sec;
     usec = self->iconify_animation_end.tv_usec - now->tv_usec;
-    if (usec < 0)
-      {
+    if (usec < 0) {
         usec += G_USEC_PER_SEC;
         sec--;
-      }
+    }
     /* no negative values */
     return MAX(sec * G_USEC_PER_SEC + usec, 0);
-  }
+}
 
 gboolean frame_animate_iconify(gpointer p)
-  {
+{
     ObDefaultFrame *self = p;
     gint x, y, w, h;
     gint iconx, icony, iconw;
@@ -1837,22 +1691,20 @@ gboolean frame_animate_iconify(gpointer p)
     gulong time;
     gboolean iconifying;
 
-    if (self->client->icon_geometry.width == 0)
-      {
+    if (self->client->icon_geometry.width == 0) {
         /* there is no icon geometry set so just go straight down */
         Rect *a =
-            screen_physical_area_monitor(screen_find_monitor(&self->area));
+                screen_physical_area_monitor(screen_find_monitor(&self->area));
         iconx = self->area.x + self->area.width / 2 + 32;
         icony = a->y + a->width;
         iconw = 64;
         g_free(a);
-      }
-    else
-      {
+    }
+    else {
         iconx = self->client->icon_geometry.x;
         icony = self->client->icon_geometry.y;
         iconw = self->client->icon_geometry.width;
-      }
+    }
 
     iconifying = self->iconify_animation_going > 0;
 
@@ -1860,25 +1712,22 @@ gboolean frame_animate_iconify(gpointer p)
     g_get_current_time(&now);
     time = frame_animate_iconify_time_left(self, &now);
 
-    if (time == 0 || iconifying)
-      {
+    if (time == 0 || iconifying) {
         /* start where the frame is supposed to be */
         x = self->area.x;
         y = self->area.y;
         w = self->area.width;
         h = self->area.height;
-      }
-    else
-      {
+    }
+    else {
         /* start at the icon */
         x = iconx;
         y = icony;
         w = iconw;
         h = self->size.top; /* just the titlebar */
-      }
+    }
 
-    if (time > 0)
-      {
+    if (time > 0) {
         glong dx, dy, dw;
         glong elapsed;
 
@@ -1886,62 +1735,59 @@ gboolean frame_animate_iconify(gpointer p)
         dy = self->area.y - icony;
         dw = self->area.width - self->bwidth * 2 - iconw;
         /* if restoring, we move in the opposite direction */
-        if (!iconifying)
-          {
+        if (!iconifying) {
             dx = -dx;
             dy = -dy;
             dw = -dw;
-          }
+        }
 
         elapsed = FRAME_ANIMATE_ICONIFY_TIME - time;
         x = x - (dx * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         y = y - (dy * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         w = w - (dw * elapsed) / FRAME_ANIMATE_ICONIFY_TIME;
         h = self->size.top; /* just the titlebar */
-      }
+    }
 
     if (time == 0)
-      frame_end_iconify_animation(self);
-    else
-      {
+        frame_end_iconify_animation(self);
+    else {
         XMoveResizeWindow(plugin.ob_display, self->window, x, y, w, h);
         XFlush(plugin.ob_display);
-      }
+    }
 
     return time > 0; /* repeat until we're out of time */
-  }
+}
 
 void frame_end_iconify_animation(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     /* see if there is an animation going */
     if (self->iconify_animation_going == 0)
-      return;
+        return;
 
     if (!self->visible)
-      XUnmapWindow(plugin.ob_display, self->window);
-    else
-      {
+        XUnmapWindow(plugin.ob_display, self->window);
+    else {
         /* Send a ConfigureNotify when the animation is done, this fixes
          KDE's pager showing the window in the wrong place.  since the
          window is mapped at a different location and is then moved, we
          need to send the synthetic configurenotify, since apps may have
          read the position when the client mapped, apparently. */
         client_reconfigure(self->client, TRUE);
-      }
+    }
 
     /* we're not animating any more ! */
     self->iconify_animation_going = 0;
 
     XMoveResizeWindow(plugin.ob_display, self->window, self->area.x,
-        self->area.y, self->area.width, self->area.height);
+            self->area.y, self->area.width, self->area.height);
     /* we delay re-rendering until after we're done animating */
     framerender_frame(self);
     XFlush(plugin.ob_display);
-  }
+}
 
 void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     gulong time;
     gboolean new_anim = FALSE;
@@ -1951,105 +1797,99 @@ void frame_begin_iconify_animation(gpointer _self, gboolean iconifying)
     /* if there is no titlebar, just don't animate for now
      XXX it would be nice tho.. */
     if (!(self->decorations & OB_FRAME_DECOR_TITLEBAR))
-      return;
+        return;
 
     /* get the current time */
     g_get_current_time(&now);
 
     /* get how long until the end */
     time = FRAME_ANIMATE_ICONIFY_TIME;
-    if (self->iconify_animation_going)
-      {
-        if (!!iconifying != (self->iconify_animation_going > 0))
-          {
+    if (self->iconify_animation_going) {
+        if (!!iconifying != (self->iconify_animation_going > 0)) {
             /* animation was already going on in the opposite direction */
             time = time - frame_animate_iconify_time_left(self, &now);
-          }
+        }
         else
-          /* animation was already going in the same direction */
-          set_end = FALSE;
-      }
+            /* animation was already going in the same direction */
+            set_end = FALSE;
+    }
     else
-      new_anim = TRUE;
+        new_anim = TRUE;
     self->iconify_animation_going = iconifying ? 1 : -1;
 
     /* set the ending time */
-    if (set_end)
-      {
+    if (set_end) {
         self->iconify_animation_end.tv_sec = now.tv_sec;
         self->iconify_animation_end.tv_usec = now.tv_usec;
         g_time_val_add(&self->iconify_animation_end, time);
-      }
+    }
 
-    if (new_anim)
-      {
+    if (new_anim) {
         ob_main_loop_timeout_remove_data(plugin.ob_main_loop,
-            frame_animate_iconify, self, FALSE);
-        ob_main_loop_timeout_add(plugin.ob_main_loop,
+                frame_animate_iconify, self, FALSE);
+        ob_main_loop_timeout_add(plugin.ob_main_loop, 
         FRAME_ANIMATE_ICONIFY_STEP_TIME, frame_animate_iconify, self,
-            g_direct_equal, NULL);
+                g_direct_equal, NULL);
 
         /* do the first step */
         frame_animate_iconify(self);
 
         /* show it during the animation even if it is not "visible" */
         if (!self->visible)
-          XMapWindow(plugin.ob_display, self->window);
-      }
-  }
+            XMapWindow(plugin.ob_display, self->window);
+    }
+}
 
 gboolean frame_iconify_animating(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     return self->iconify_animation_going != 0;
-  }
-
-ObFramePlugin plugin =
-  { 0, //gpointer handler;
-      "libminimal.la", //gchar * filename;
-      "minimal", //gchar * name;
-      init, //gint (*init) (Display * display, gint screen);
-      0,
-      frame_new, //gpointer (*frame_new) (struct _ObClient *c);
-      frame_free, //void (*frame_free) (gpointer self);
-      frame_show, //void (*frame_show) (gpointer self);
-      frame_hide, //void (*frame_hide) (gpointer self);
-      frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
-      frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
-      frame_adjust_area, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
-      frame_adjust_client_area, //void (*frame_adjust_client_area) (gpointer self);
-      frame_adjust_state, //void (*frame_adjust_state) (gpointer self);
-      frame_adjust_focus, //void (*frame_adjust_focus) (gpointer self, gboolean hilite);
-      frame_adjust_title, //void (*frame_adjust_title) (gpointer self);
-      frame_adjust_icon, //void (*frame_adjust_icon) (gpointer self);
-      frame_grab_client, //void (*frame_grab_client) (gpointer self);
-      frame_release_client, //void (*frame_release_client) (gpointer self);
-//      frame_context_from_string, //ObFrameContext (*frame_context_from_string) (const gchar *name);
-      frame_context, //ObFrameContext (*frame_context) (struct _ObClient *self, Window win, gint x, gint y);
-      frame_client_gravity, //void (*frame_client_gravity) (gpointer self, gint *x, gint *y);
-      frame_frame_gravity, //void (*frame_frame_gravity) (gpointer self, gint *x, gint *y);
-      frame_rect_to_frame, //void (*frame_rect_to_frame) (gpointer self, Rect *r);
-      frame_rect_to_client, //void (*frame_rect_to_client) (gpointer self, Rect *r);
-      frame_flash_start, //void (*frame_flash_start) (gpointer self);
-      frame_flash_stop, //void (*frame_flash_stop) (gpointer self);
-      frame_begin_iconify_animation, //void (*frame_begin_iconify_animation) (gpointer self, gboolean iconifying);
-      frame_end_iconify_animation, //void (*frame_end_iconify_animation) (gpointer self);
-      frame_iconify_animating, // gboolean (*frame_iconify_animating)(gpointer p);
-      load_theme_config,
-
-      /* This fields are fill by openbox. */
-      0, //Display * ob_display;
-      0, //gint ob_screen;
-      0, //RrInstance *ob_rr_inst;
- //     0, //RrTheme    *ob_rr_theme;
-      0, //gboolean config_theme_keepborder;
-      0, //struct _ObClient *focus_cycle_target;
-      0, //gchar *config_title_layout;
-      FALSE, //gboolean moveresize_in_progress;
-      0, //struct _ObMainLoop *ob_main_loop;
+}
+
+ObFramePlugin plugin = { 0, //gpointer handler;
+        "libminimal.la", //gchar * filename;
+        "minimal", //gchar * name;
+        init, //gint (*init) (Display * display, gint screen);
+        0, frame_new, //gpointer (*frame_new) (struct _ObClient *c);
+        frame_free, //void (*frame_free) (gpointer self);
+        frame_show, //void (*frame_show) (gpointer self);
+        frame_hide, //void (*frame_hide) (gpointer self);
+        frame_adjust_theme, //void (*frame_adjust_theme) (gpointer self);
+        frame_adjust_shape, //void (*frame_adjust_shape) (gpointer self);
+        frame_adjust_area, //void (*frame_adjust_area) (gpointer self, gboolean moved, gboolean resized, gboolean fake);
+        frame_adjust_client_area, //void (*frame_adjust_client_area) (gpointer self);
+        frame_adjust_state, //void (*frame_adjust_state) (gpointer self);
+        frame_adjust_focus, //void (*frame_adjust_focus) (gpointer self, gboolean hilite);
+        frame_adjust_title, //void (*frame_adjust_title) (gpointer self);
+        frame_adjust_icon, //void (*frame_adjust_icon) (gpointer self);
+        frame_grab_client, //void (*frame_grab_client) (gpointer self);
+        frame_release_client, //void (*frame_release_client) (gpointer self);
+        //      frame_context_from_string, //ObFrameContext (*frame_context_from_string) (const gchar *name);
+        frame_context, //ObFrameContext (*frame_context) (struct _ObClient *self, Window win, gint x, gint y);
+        frame_client_gravity, //void (*frame_client_gravity) (gpointer self, gint *x, gint *y);
+        frame_frame_gravity, //void (*frame_frame_gravity) (gpointer self, gint *x, gint *y);
+        frame_rect_to_frame, //void (*frame_rect_to_frame) (gpointer self, Rect *r);
+        frame_rect_to_client, //void (*frame_rect_to_client) (gpointer self, Rect *r);
+        frame_flash_start, //void (*frame_flash_start) (gpointer self);
+        frame_flash_stop, //void (*frame_flash_stop) (gpointer self);
+        frame_begin_iconify_animation, //void (*frame_begin_iconify_animation) (gpointer self, gboolean iconifying);
+        frame_end_iconify_animation, //void (*frame_end_iconify_animation) (gpointer self);
+        frame_iconify_animating, // gboolean (*frame_iconify_animating)(gpointer p);
+        load_theme_config,
+
+        /* This fields are fill by openbox. */
+        0, //Display * ob_display;
+        0, //gint ob_screen;
+        0, //RrInstance *ob_rr_inst;
+        //     0, //RrTheme    *ob_rr_theme;
+                0, //gboolean config_theme_keepborder;
+        0, //struct _ObClient *focus_cycle_target;
+        0, //gchar *config_title_layout;
+        FALSE, //gboolean moveresize_in_progress;
+        0, //struct _ObMainLoop *ob_main_loop;
 };
 
 ObFramePlugin * get_info()
-  {
+{
     return &plugin;
-  }
+}
diff --git a/engines/minimal/frame_minimal_plugin.h b/engines/minimal/frame_minimal_plugin.h
index 81da4f7..1ceec26 100644
--- a/engines/minimal/frame_minimal_plugin.h
+++ b/engines/minimal/frame_minimal_plugin.h
@@ -26,7 +26,7 @@
 ObFrameThemeConfig theme_config;
 
 struct _ObDefaultFrame
-  {
+{
     // PUBLIC :
     struct _ObClient *client;
 
@@ -159,7 +159,7 @@ struct _ObDefaultFrame
 
     GTimeVal iconify_animation_end;
 
-  };
+};
 
 typedef struct _ObDefaultFrame ObDefaultFrame;
 
@@ -172,7 +172,7 @@ void frame_hide(gpointer self);
 void frame_adjust_theme(gpointer self);
 void frame_adjust_shape(gpointer self);
 void frame_adjust_area(gpointer self, gboolean moved, gboolean resized,
-    gboolean fake);
+        gboolean fake);
 void frame_adjust_client_area(gpointer self);
 void frame_adjust_state(gpointer self);
 void frame_adjust_focus(gpointer self, gboolean hilite);
@@ -180,8 +180,7 @@ void frame_adjust_title(gpointer self);
 void frame_adjust_icon(gpointer self);
 void frame_grab_client(gpointer self, GHashTable *);
 void frame_release_client(gpointer self, GHashTable *);
-ObFrameContext
-    frame_context(gpointer, Window win, gint x, gint y);
+ObFrameContext frame_context(gpointer, Window win, gint x, gint y);
 void frame_client_gravity(gpointer self, gint *x, gint *y);
 void frame_frame_gravity(gpointer self, gint *x, gint *y);
 void frame_rect_to_frame(gpointer self, Rect *r);
diff --git a/engines/minimal/frame_minimal_render.c b/engines/minimal/frame_minimal_render.c
index 9df79d3..abfc4d6 100644
--- a/engines/minimal/frame_minimal_render.c
+++ b/engines/minimal/frame_minimal_render.c
@@ -27,7 +27,6 @@
 
 #include "render/theme.h"
 
-
 static void framerender_label(ObDefaultFrame *self, RrAppearance *a);
 static void framerender_icon(ObDefaultFrame *self, RrAppearance *a);
 static void framerender_max(ObDefaultFrame *self, RrAppearance *a);
@@ -37,21 +36,21 @@ static void framerender_shade(ObDefaultFrame *self, RrAppearance *a);
 static void framerender_close(ObDefaultFrame *self, RrAppearance *a);
 
 void framerender_frame(gpointer _self)
-  {
+{
     ObDefaultFrame * self = (ObDefaultFrame *) _self;
     if (plugin.frame_iconify_animating(self))
-      return; /* delay redrawing until the animation is done */
+        return; /* delay redrawing until the animation is done */
     if (!self->need_render)
-      return;
+        return;
     if (!self->visible)
-      return;
+        return;
     self->need_render = FALSE;
 
-      {
+    {
         gulong px;
 
         px = (self->focused ? RrColorPixel(theme_config.cb_focused_color)
-            : RrColorPixel(theme_config.cb_unfocused_color));
+                : RrColorPixel(theme_config.cb_unfocused_color));
 
         XSetWindowBackground(plugin.ob_display, self->backback, px);
         XClearWindow(plugin.ob_display, self->backback);
@@ -73,8 +72,8 @@ void framerender_frame(gpointer _self)
         XClearWindow(plugin.ob_display, self->innerbrb);
 
         px
-            = (self->focused ? RrColorPixel(theme_config.frame_focused_border_color)
-                : RrColorPixel(theme_config.frame_unfocused_border_color));
+                = (self->focused ? RrColorPixel(theme_config.frame_focused_border_color)
+                        : RrColorPixel(theme_config.frame_unfocused_border_color));
 
         XSetWindowBackground(plugin.ob_display, self->left, px);
         XClearWindow(plugin.ob_display, self->left);
@@ -117,99 +116,96 @@ void framerender_frame(gpointer _self)
 
         /* don't use the separator color for shaded windows */
         if (!self->client->shaded)
-          px
-              = (self->focused ? RrColorPixel(theme_config.title_separator_focused_color)
-                  : RrColorPixel(theme_config.title_separator_unfocused_color));
+            px
+                    = (self->focused ? RrColorPixel(theme_config.title_separator_focused_color)
+                            : RrColorPixel(theme_config.title_separator_unfocused_color));
 
         XSetWindowBackground(plugin.ob_display, self->titlebottom, px);
         XClearWindow(plugin.ob_display, self->titlebottom);
-      }
+    }
 
-    if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-      {
+    if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
         RrAppearance *t, *l, *m, *n, *i, *d, *s, *c, *clear;
-        if (self->focused)
-          {
+        if (self->focused) {
 
             t = self->a_focused_title;
             l = self->a_focused_label;
 
             m
-                = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? theme_config.a_disabled_focused_max
-                    : (self->client->max_vert || self->client->max_horz ? (self->max_press ? theme_config.a_toggled_focused_pressed_max
-                        : (self->max_hover ? theme_config.a_toggled_hover_focused_max
-                            : theme_config.a_toggled_focused_unpressed_max))
-                        : (self->max_press ? theme_config.a_focused_pressed_max
-                            : (self->max_hover ? theme_config.a_hover_focused_max
-                                : theme_config.a_focused_unpressed_max))));
+                    = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? theme_config.a_disabled_focused_max
+                            : (self->client->max_vert || self->client->max_horz ? (self->max_press ? theme_config.a_toggled_focused_pressed_max
+                                    : (self->max_hover ? theme_config.a_toggled_hover_focused_max
+                                            : theme_config.a_toggled_focused_unpressed_max))
+                                    : (self->max_press ? theme_config.a_focused_pressed_max
+                                            : (self->max_hover ? theme_config.a_hover_focused_max
+                                                    : theme_config.a_focused_unpressed_max))));
             n = self->a_icon;
             i
-                = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? theme_config.a_disabled_focused_iconify
-                    : (self->iconify_press ? theme_config.a_focused_pressed_iconify
-                        : (self->iconify_hover ? theme_config.a_hover_focused_iconify
-                            : theme_config.a_focused_unpressed_iconify)));
+                    = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? theme_config.a_disabled_focused_iconify
+                            : (self->iconify_press ? theme_config.a_focused_pressed_iconify
+                                    : (self->iconify_hover ? theme_config.a_hover_focused_iconify
+                                            : theme_config.a_focused_unpressed_iconify)));
             d
-                = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ? theme_config.a_disabled_focused_desk
-                    : (self->client->desktop == DESKTOP_ALL ? (self->desk_press ? theme_config.a_toggled_focused_pressed_desk
-                        : (self->desk_hover ? theme_config.a_toggled_hover_focused_desk
-                            : theme_config.a_toggled_focused_unpressed_desk))
-                        : (self->desk_press ? theme_config.a_focused_pressed_desk
-                            : (self->desk_hover ? theme_config.a_hover_focused_desk
-                                : theme_config.a_focused_unpressed_desk))));
+                    = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ? theme_config.a_disabled_focused_desk
+                            : (self->client->desktop == DESKTOP_ALL ? (self->desk_press ? theme_config.a_toggled_focused_pressed_desk
+                                    : (self->desk_hover ? theme_config.a_toggled_hover_focused_desk
+                                            : theme_config.a_toggled_focused_unpressed_desk))
+                                    : (self->desk_press ? theme_config.a_focused_pressed_desk
+                                            : (self->desk_hover ? theme_config.a_hover_focused_desk
+                                                    : theme_config.a_focused_unpressed_desk))));
             s
-                = (!(self->decorations & OB_FRAME_DECOR_SHADE) ? theme_config.a_disabled_focused_shade
-                    : (self->client->shaded ? (self->shade_press ? theme_config.a_toggled_focused_pressed_shade
-                        : (self->shade_hover ? theme_config.a_toggled_hover_focused_shade
-                            : theme_config.a_toggled_focused_unpressed_shade))
-                        : (self->shade_press ? theme_config.a_focused_pressed_shade
-                            : (self->shade_hover ? theme_config.a_hover_focused_shade
-                                : theme_config.a_focused_unpressed_shade))));
+                    = (!(self->decorations & OB_FRAME_DECOR_SHADE) ? theme_config.a_disabled_focused_shade
+                            : (self->client->shaded ? (self->shade_press ? theme_config.a_toggled_focused_pressed_shade
+                                    : (self->shade_hover ? theme_config.a_toggled_hover_focused_shade
+                                            : theme_config.a_toggled_focused_unpressed_shade))
+                                    : (self->shade_press ? theme_config.a_focused_pressed_shade
+                                            : (self->shade_hover ? theme_config.a_hover_focused_shade
+                                                    : theme_config.a_focused_unpressed_shade))));
             c
-                = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ? theme_config.a_disabled_focused_close
-                    : (self->close_press ? theme_config.a_focused_pressed_close
-                        : (self->close_hover ? theme_config.a_hover_focused_close
-                            : theme_config.a_focused_unpressed_close)));
-          }
-        else
-          {
+                    = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ? theme_config.a_disabled_focused_close
+                            : (self->close_press ? theme_config.a_focused_pressed_close
+                                    : (self->close_hover ? theme_config.a_hover_focused_close
+                                            : theme_config.a_focused_unpressed_close)));
+        }
+        else {
             t = self->a_unfocused_title;
             l = self->a_unfocused_label;
             m
-                = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? theme_config.a_disabled_unfocused_max
-                    : (self->client->max_vert || self->client->max_horz ? (self->max_press ? theme_config.a_toggled_unfocused_pressed_max
-                        : (self->max_hover ? theme_config.a_toggled_hover_unfocused_max
-                            : theme_config.a_toggled_unfocused_unpressed_max))
-                        : (self->max_press ? theme_config.a_unfocused_pressed_max
-                            : (self->max_hover ? theme_config.a_hover_unfocused_max
-                                : theme_config.a_unfocused_unpressed_max))));
+                    = (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) ? theme_config.a_disabled_unfocused_max
+                            : (self->client->max_vert || self->client->max_horz ? (self->max_press ? theme_config.a_toggled_unfocused_pressed_max
+                                    : (self->max_hover ? theme_config.a_toggled_hover_unfocused_max
+                                            : theme_config.a_toggled_unfocused_unpressed_max))
+                                    : (self->max_press ? theme_config.a_unfocused_pressed_max
+                                            : (self->max_hover ? theme_config.a_hover_unfocused_max
+                                                    : theme_config.a_unfocused_unpressed_max))));
             n = self->a_icon;
             i
-                = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? theme_config.a_disabled_unfocused_iconify
-                    : (self->iconify_press ? theme_config.a_unfocused_pressed_iconify
-                        : (self->iconify_hover ? theme_config.a_hover_unfocused_iconify
-                            : theme_config.a_unfocused_unpressed_iconify)));
+                    = (!(self->decorations & OB_FRAME_DECOR_ICONIFY) ? theme_config.a_disabled_unfocused_iconify
+                            : (self->iconify_press ? theme_config.a_unfocused_pressed_iconify
+                                    : (self->iconify_hover ? theme_config.a_hover_unfocused_iconify
+                                            : theme_config.a_unfocused_unpressed_iconify)));
             d
-                = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ? theme_config.a_disabled_unfocused_desk
-                    : (self->client->desktop == DESKTOP_ALL ? (self->desk_press ? theme_config.a_toggled_unfocused_pressed_desk
-                        : (self->desk_hover ? theme_config.a_toggled_hover_unfocused_desk
-                            : theme_config.a_toggled_unfocused_unpressed_desk))
-                        : (self->desk_press ? theme_config.a_unfocused_pressed_desk
-                            : (self->desk_hover ? theme_config.a_hover_unfocused_desk
-                                : theme_config.a_unfocused_unpressed_desk))));
+                    = (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) ? theme_config.a_disabled_unfocused_desk
+                            : (self->client->desktop == DESKTOP_ALL ? (self->desk_press ? theme_config.a_toggled_unfocused_pressed_desk
+                                    : (self->desk_hover ? theme_config.a_toggled_hover_unfocused_desk
+                                            : theme_config.a_toggled_unfocused_unpressed_desk))
+                                    : (self->desk_press ? theme_config.a_unfocused_pressed_desk
+                                            : (self->desk_hover ? theme_config.a_hover_unfocused_desk
+                                                    : theme_config.a_unfocused_unpressed_desk))));
             s
-                = (!(self->decorations & OB_FRAME_DECOR_SHADE) ? theme_config.a_disabled_unfocused_shade
-                    : (self->client->shaded ? (self->shade_press ? theme_config.a_toggled_unfocused_pressed_shade
-                        : (self->shade_hover ? theme_config.a_toggled_hover_unfocused_shade
-                            : theme_config.a_toggled_unfocused_unpressed_shade))
-                        : (self->shade_press ? theme_config.a_unfocused_pressed_shade
-                            : (self->shade_hover ? theme_config.a_hover_unfocused_shade
-                                : theme_config.a_unfocused_unpressed_shade))));
+                    = (!(self->decorations & OB_FRAME_DECOR_SHADE) ? theme_config.a_disabled_unfocused_shade
+                            : (self->client->shaded ? (self->shade_press ? theme_config.a_toggled_unfocused_pressed_shade
+                                    : (self->shade_hover ? theme_config.a_toggled_hover_unfocused_shade
+                                            : theme_config.a_toggled_unfocused_unpressed_shade))
+                                    : (self->shade_press ? theme_config.a_unfocused_pressed_shade
+                                            : (self->shade_hover ? theme_config.a_hover_unfocused_shade
+                                                    : theme_config.a_unfocused_unpressed_shade))));
             c
-                = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ? theme_config.a_disabled_unfocused_close
-                    : (self->close_press ? theme_config.a_unfocused_pressed_close
-                        : (self->close_hover ? theme_config.a_hover_unfocused_close
-                            : theme_config.a_unfocused_unpressed_close)));
-          }
+                    = (!(self->decorations & OB_FRAME_DECOR_CLOSE) ? theme_config.a_disabled_unfocused_close
+                            : (self->close_press ? theme_config.a_unfocused_pressed_close
+                                    : (self->close_hover ? theme_config.a_hover_unfocused_close
+                                            : theme_config.a_unfocused_unpressed_close)));
+        }
         clear = theme_config.a_clear;
 
         RrPaint(t, self->title, self->width, theme_config.title_height);
@@ -220,28 +216,28 @@ void framerender_frame(gpointer _self)
         clear->surface.parentx = theme_config.grip_width;
 
         RrPaint(clear, self->topresize, self->width - theme_config.grip_width
-            * 2, theme_config.paddingy + 1);
+                * 2, theme_config.paddingy + 1);
 
         clear->surface.parentx = 0;
 
         if (theme_config.grip_width > 0)
-          RrPaint(clear, self->tltresize, theme_config.grip_width,
-              theme_config.paddingy + 1);
+            RrPaint(clear, self->tltresize, theme_config.grip_width,
+                    theme_config.paddingy + 1);
         if (theme_config.title_height > 0)
-          RrPaint(clear, self->tllresize, theme_config.paddingx + 1,
-              theme_config.title_height);
+            RrPaint(clear, self->tllresize, theme_config.paddingx + 1,
+                    theme_config.title_height);
 
         clear->surface.parentx = self->width - theme_config.grip_width;
 
         if (theme_config.grip_width > 0)
-          RrPaint(clear, self->trtresize, theme_config.grip_width,
-              theme_config.paddingy + 1);
+            RrPaint(clear, self->trtresize, theme_config.grip_width,
+                    theme_config.paddingy + 1);
 
         clear->surface.parentx = self->width - (theme_config.paddingx + 1);
 
         if (theme_config.title_height > 0)
-          RrPaint(clear, self->trrresize, theme_config.paddingx + 1,
-              theme_config.title_height);
+            RrPaint(clear, self->trrresize, theme_config.paddingx + 1,
+                    theme_config.title_height);
 
         /* set parents for any parent relative guys */
         l->surface.parent = t;
@@ -279,107 +275,104 @@ void framerender_frame(gpointer _self)
         framerender_desk(self, d);
         framerender_shade(self, s);
         framerender_close(self, c);
-      }
+    }
 
     if (self->decorations & OB_FRAME_DECOR_HANDLE && theme_config.handle_height
-        > 0)
-      {
+            > 0) {
         RrAppearance *h, *g;
 
         h = (self->focused ? self->a_focused_handle : self->a_unfocused_handle);
 
         RrPaint(h, self->handle, self->width, theme_config.handle_height);
 
-        if (self->decorations & OB_FRAME_DECOR_GRIPS)
-          {
+        if (self->decorations & OB_FRAME_DECOR_GRIPS) {
             g = (self->focused ? theme_config.a_focused_grip
-                : theme_config.a_unfocused_grip);
+                    : theme_config.a_unfocused_grip);
 
             if (g->surface.grad == RR_SURFACE_PARENTREL)
-              g->surface.parent = h;
+                g->surface.parent = h;
 
             g->surface.parentx = 0;
             g->surface.parenty = 0;
 
             RrPaint(g, self->lgrip, theme_config.grip_width,
-                theme_config.handle_height);
+                    theme_config.handle_height);
 
             g->surface.parentx = self->width - theme_config.grip_width;
             g->surface.parenty = 0;
 
             RrPaint(g, self->rgrip, theme_config.grip_width,
-                theme_config.handle_height);
-          }
-      }
+                    theme_config.handle_height);
+        }
+    }
 
     XFlush(plugin.ob_display);
-  }
+}
 
 static void framerender_label(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     if (!self->label_on)
-      return;
+        return;
     /* set the texture's text! */
     a->texture[0].data.text.string = self->client->title;
     RrPaint(a, self->label, self->label_width, theme_config.label_height);
-  }
+}
 
 static void framerender_icon(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     const ObClientIcon *icon;
 
     if (!self->icon_on)
-      return;
+        return;
 
     icon = client_icon(self->client, theme_config.button_size + 2,
-        theme_config.button_size + 2);
-    if (icon)
-      {
+            theme_config.button_size + 2);
+    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
-      a->texture[0].type = RR_TEXTURE_NONE;
+        a->texture[0].type = RR_TEXTURE_NONE;
 
     RrPaint(a, self->icon, theme_config.button_size + 2,
-        theme_config.button_size + 2);
-  }
+            theme_config.button_size + 2);
+}
 
 static void framerender_max(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     if (!self->max_on)
-      return;
+        return;
     RrPaint(a, self->max, theme_config.button_size, theme_config.button_size);
-  }
+}
 
 static void framerender_iconify(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     if (!self->iconify_on)
-      return;
+        return;
     RrPaint(a, self->iconify, theme_config.button_size,
-        theme_config.button_size);
-  }
+            theme_config.button_size);
+}
 
 static void framerender_desk(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     if (!self->desk_on)
-      return;
+        return;
     RrPaint(a, self->desk, theme_config.button_size, theme_config.button_size);
-  }
+}
 
 static void framerender_shade(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     if (!self->shade_on)
-      return;
+        return;
     RrPaint(a, self->shade, theme_config.button_size, theme_config.button_size);
-  }
+}
 
 static void framerender_close(ObDefaultFrame *self, RrAppearance *a)
-  {
+{
     if (!self->close_on)
-      return;
+        return;
     RrPaint(a, self->close, theme_config.button_size, theme_config.button_size);
-  }
+}
diff --git a/engines/minimal/frame_minimal_render.h b/engines/minimal/frame_minimal_render.h
index feb56f3..7996540 100644
--- a/engines/minimal/frame_minimal_render.h
+++ b/engines/minimal/frame_minimal_render.h
@@ -1,20 +1,20 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
-   frame_minimal_render.h for the Openbox window manager
-   Copyright (c) 2003-2007   Dana Jansens
+ frame_minimal_render.h for the Openbox window manager
+ 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
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
 
-   See the COPYING file for a copy of the GNU General Public License.
-*/
+ See the COPYING file for a copy of the GNU General Public License.
+ */
 
 #ifndef FRAME_MINIMAL_RENDER_H_
 #define __framerender_h
diff --git a/openbox/client.c b/openbox/client.c
index eac1994..c6b5781 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1946,7 +1946,7 @@ void client_update_title(ObClient *self)
     self->title = visible;
 
     if (self->frame)
-	render_plugin->frame_update_layout (self->frame, FALSE, FALSE);
+    render_plugin->frame_update_layout (self->frame, FALSE, FALSE);
 
     /* update the icon title */
     data = NULL;
@@ -2348,7 +2348,7 @@ static void client_change_state(ObClient *self)
     OBT_PROP_SETA32(self->window, NET_WM_STATE, ATOM, netstate, num);
 
     if (self->frame)
-	render_plugin->frame_update_layout (self->frame, FALSE, FALSE);
+    render_plugin->frame_update_layout (self->frame, FALSE, FALSE);
 }
 
 ObClient *client_search_focus_tree(ObClient *self)
@@ -2950,8 +2950,8 @@ void client_configure(ObClient *self, gint x, gint y, gint w, gint h,
     gboolean fvert = render_plugin->frame_is_max_vert(self->frame);
     gint logicalw, logicalh;
 
-	Strut size = render_plugin->frame_get_size(self->frame);
-	Rect area = render_plugin->frame_get_window_area(self->frame);
+    Strut size = render_plugin->frame_get_size(self->frame);
+    Rect area = render_plugin->frame_get_window_area(self->frame);
 
     /* find the new x, y, width, and height (and logical size) */
     client_try_configure(self, &x, &y, &w, &h, &logicalw, &logicalh, user);
@@ -3185,7 +3185,7 @@ static void client_iconify_recursive(ObClient *self,
     if (changed) {
         client_change_state(self);
         if (config_animate_iconify && !hide_animation)
-		render_plugin->frame_begin_iconify_animation(self->frame, iconic);
+        render_plugin->frame_begin_iconify_animation(self->frame, iconic);
         /* do this after starting the animation so it doesn't flash */
         client_showhide(self);
     }
@@ -3418,9 +3418,9 @@ void client_hilite(ObClient *self, gboolean hilite)
     self->demands_attention = hilite && !client_focused(self);
     if (self->frame != NULL) { /* if we're mapping, just set the state */
         if (self->demands_attention)
-		render_plugin->frame_flash_start(self->frame);
+        render_plugin->frame_flash_start(self->frame);
         else
-		render_plugin->frame_flash_stop(self->frame);
+        render_plugin->frame_flash_stop(self->frame);
         client_change_state(self);
     }
 }
@@ -3941,7 +3941,7 @@ void client_set_undecorated(ObClient *self, gboolean undecorated)
 
 guint client_monitor(ObClient *self)
 {
-	Rect area = render_plugin->frame_get_window_area(self->frame);
+    Rect area = render_plugin->frame_get_window_area(self->frame);
     return screen_find_monitor(&area);
 }
 
@@ -4137,8 +4137,8 @@ void client_find_edge_directional(ObClient *self, ObDirection dir,
     Rect dock_area;
     gint edge;
 
-	Strut size = render_plugin->frame_get_size(self->frame);
-	Rect area = render_plugin->frame_get_window_area(self->frame);
+    Strut size = render_plugin->frame_get_size(self->frame);
+    Rect area = render_plugin->frame_get_window_area(self->frame);
 
     a = screen_area(self->desktop, SCREEN_AREA_ALL_MONITORS,
                     &area);
diff --git a/openbox/client_menu.c b/openbox/client_menu.c
index 4dc5e0e..c7617e4 100644
--- a/openbox/client_menu.c
+++ b/openbox/client_menu.c
@@ -297,8 +297,8 @@ static void client_menu_place(ObMenuFrame *frame, gint *x, gint *y,
 
     if (!mouse && frame->client) {
 
-	Strut size = render_plugin->frame_get_size(frame->client->frame);
-	Rect area = render_plugin->frame_get_window_area(frame->client->frame);
+    Strut size = render_plugin->frame_get_size(frame->client->frame);
+    Rect area = render_plugin->frame_get_window_area(frame->client->frame);
 
         *x = area.x;
 
diff --git a/openbox/engine_interface.c b/openbox/engine_interface.c
index 768521e..b271762 100644
--- a/openbox/engine_interface.c
+++ b/openbox/engine_interface.c
@@ -1,21 +1,21 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
-   keyboard.c for the Openbox window manager
-   Copyright (c) 2006        Mikael Magnusson
-   Copyright (c) 2003-2007   Dana Jansens
+ keyboard.c for the Openbox window manager
+ Copyright (c) 2006        Mikael Magnusson
+ 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
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
+ 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
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
 
-   See the COPYING file for a copy of the GNU General Public License.
-*/
+ See the COPYING file for a copy of the GNU General Public License.
+ */
 
 #include "engine_interface.h"
 #include "config.h"
@@ -34,407 +34,387 @@ XrmDatabase loaddb(const gchar *name, gchar **path);
 /* Read string in XrmDatabase */
 gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value);
 
-ObFramePlugin * init_frame_plugin (const gchar *name,
-    gboolean allow_fallback, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font)
-  {
+ObFramePlugin * init_frame_plugin(const gchar *name, gboolean allow_fallback,
+        RrFont *active_window_font, RrFont *inactive_window_font,
+        RrFont *menu_title_font, RrFont *menu_item_font, RrFont *osd_font)
+{
     XrmDatabase db = NULL;
     gchar *path;
 
-    if (name)
-      {
+    if (name) {
         db = loaddb(name, &path);
-        if (db == NULL)
-          {
+        if (db == NULL) {
             g_message("Unable to load the theme '%s'", name);
             if (allow_fallback)
-              //g_message("Falling back to the default theme '%s'", DEFAULT_THEME);
-              /* fallback to the default theme */
-              name = NULL;
-          }
-      }
-    if (name == NULL)
-      {
-        if (allow_fallback)
-          {
+                //g_message("Falling back to the default theme '%s'", DEFAULT_THEME);
+                /* fallback to the default theme */
+                name = NULL;
+        }
+    }
+    if (name == NULL) {
+        if (allow_fallback) {
             //db = loaddb(DEFAULT_THEME, &path);
             db = NULL;
-            if (db == NULL)
-              {
+            if (db == NULL) {
                 //g_message("Unable to load the theme '%s'", DEFAULT_THEME);
                 return 0;
-              }
-          }
+            }
+        }
         else
-          return 0;
-      }
+            return 0;
+    }
 
     gchar * plugin_filename;
-    if (!read_string(db, "frame.theme.engine", &plugin_filename))
-      {
+    if (!read_string(db, "frame.theme.engine", &plugin_filename)) {
         plugin_filename = "libdefault.la";
-      }
+    }
     ob_debug("Try to init : %s", plugin_filename);
-    gchar * absolute_plugin_filename = g_build_filename (g_get_home_dir(), ".config", "openbox", "engines", plugin_filename, NULL);
-    ObFramePlugin * p = load_frame_plugin (absolute_plugin_filename);
+    gchar * absolute_plugin_filename = g_build_filename(g_get_home_dir(),
+            ".config", "openbox", "engines", plugin_filename, NULL);
+    ObFramePlugin * p = load_frame_plugin(absolute_plugin_filename);
     g_free(absolute_plugin_filename);
 
-    update_frame_plugin (p);
+    update_frame_plugin(p);
 
     (p->load_theme_config)(ob_rr_inst, name, path, db, active_window_font,
-        inactive_window_font, menu_title_font, menu_item_font, osd_font);
+            inactive_window_font, menu_title_font, menu_item_font, osd_font);
 
     g_free(path);
     XrmDestroyDatabase(db);
 
     return p;
-  }
+}
 
-void update_frame_plugin (ObFramePlugin * self)
-  {
+void update_frame_plugin(ObFramePlugin * self)
+{
     self->ob_display = obt_display;
     self->ob_screen = ob_screen;
     self->ob_rr_inst = ob_rr_inst;
     self->config_theme_keepborder = config_theme_keepborder;
     self->config_title_layout = config_title_layout;
     self->ob_main_loop = ob_main_loop;
-  }
+}
 
-ObFramePlugin * load_frame_plugin (const gchar * filename)
-  {
+ObFramePlugin * load_frame_plugin(const gchar * filename)
+{
     GModule *module;
     gpointer func;
 
-    if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL)))
-      {
+    if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL))) {
         ob_debug_type(OB_DEBUG_SM, "Failed to load plugin (%s): %s\n",
-            filename, g_module_error());
+                filename, g_module_error());
         exit(1);
-      }
+    }
 
-    if (g_module_symbol(module, "get_info", &func))
-      {
+    if (g_module_symbol(module, "get_info", &func)) {
         ObFramePlugin *plugin = (ObFramePlugin *) ((ObFramePluginFunc) func)();
         return plugin;
-      }
-    else
-      {
+    }
+    else {
         ob_debug_type(OB_DEBUG_SM,
-            "Failed to get \"get_info\" function (%s): %s\n", filename,
-            g_module_error());
+                "Failed to get \"get_info\" function (%s): %s\n", filename,
+                g_module_error());
         exit(1);
-      }
+    }
 
     ob_debug_type(OB_DEBUG_SM, "Invalid plugin (%s)\n", filename);
     g_module_close(module);
     exit(1);
-  }
+}
 /*
-static gboolean scan_plugin_func(const gchar * path, const gchar * basename,
-    gpointer data)
-  {
-    if (!str_has_suffix_nocase(basename, SHARED_SUFFIX))
-      return FALSE;
+ static gboolean scan_plugin_func(const gchar * path, const gchar * basename,
+ gpointer data)
+ {
+ if (!str_has_suffix_nocase(basename, SHARED_SUFFIX))
+ return FALSE;
 
-    if (!g_file_test(path, G_FILE_TEST_IS_REGULAR))
-      return FALSE;
+ if (!g_file_test(path, G_FILE_TEST_IS_REGULAR))
+ return FALSE;
 
-    add_plugin(path);
+ add_plugin(path);
 
-    return FALSE;
-  }
+ return FALSE;
+ }
 
-static void scan_plugins(const gchar * path)
-  {
-    dir_foreach(path, scan_plugin_func, NULL, NULL);
-  }
-*/
+ static void scan_plugins(const gchar * path)
+ {
+ dir_foreach(path, scan_plugin_func, NULL, NULL);
+ }
+ */
 gboolean read_string(XrmDatabase db, const gchar *rname, gchar **value)
-  {
+{
     gboolean ret = FALSE;
     gchar *rclass = create_class_name(rname);
     gchar *rettype;
     XrmValue retvalue;
 
     if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr
-        != NULL)
-      {
+            != NULL) {
         *value = retvalue.addr;
         ret = TRUE;
-      }
+    }
 
     g_free(rclass);
     return ret;
-  }
+}
 
 XrmDatabase loaddb(const gchar *name, gchar **path)
-  {
+{
     GSList *it;
     XrmDatabase db = NULL;
     gchar *s;
 
-    if (name[0] == '/')
-      {
+    if (name[0] == '/') {
         s = g_build_filename(name, "openbox-3", "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
-      }
-    else
-      {
+    }
+    else {
         ObtPaths *p;
 
         p = obt_paths_new();
         /* XXX backwards compatibility, remove me sometime later */
         s = g_build_filename(g_get_home_dir(), ".themes", name, "openbox-3",
-            "themerc", NULL);
+                "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
 
-        for (it = obt_paths_data_dirs(p); !db && it; it = g_slist_next(it))
-          {
+        for (it = obt_paths_data_dirs(p); !db && it; it = g_slist_next(it)) {
             s = g_build_filename(it->data, "themes", name, "openbox-3",
-                "themerc", NULL);
+                    "themerc", NULL);
             if ((db = XrmGetFileDatabase(s)))
-              *path = g_path_get_dirname(s);
+                *path = g_path_get_dirname(s);
             g_free(s);
-          }
-      }
+        }
+    }
 
-    if (db == NULL)
-      {
+    if (db == NULL) {
         s = g_build_filename(name, "themerc", NULL);
         if ((db = XrmGetFileDatabase(s)))
-          *path = g_path_get_dirname(s);
+            *path = g_path_get_dirname(s);
         g_free(s);
-      }
+    }
 
     return db;
-  }
+}
 
 gchar *create_class_name(const gchar *rname)
-  {
+{
     gchar *rclass = g_strdup(rname);
     gchar *p = rclass;
 
-    while (TRUE)
-      {
+    while (TRUE) {
         *p = toupper(*p);
         p = strchr(p+1, '.');
         if (p == NULL)
-          break;
+            break;
         ++p;
         if (*p == '\0')
-          break;
-      }
+            break;
+    }
     return rclass;
-  }
+}
 
 ObFrameContext frame_context_from_string(const gchar *name)
-  {
+{
     if (!g_ascii_strcasecmp("Desktop", name))
-      return OB_FRAME_CONTEXT_DESKTOP;
+        return OB_FRAME_CONTEXT_DESKTOP;
     else if (!g_ascii_strcasecmp("Root", name))
-      return OB_FRAME_CONTEXT_ROOT;
+        return OB_FRAME_CONTEXT_ROOT;
     else if (!g_ascii_strcasecmp("Client", name))
-      return OB_FRAME_CONTEXT_CLIENT;
+        return OB_FRAME_CONTEXT_CLIENT;
     else if (!g_ascii_strcasecmp("Titlebar", name))
-      return OB_FRAME_CONTEXT_TITLEBAR;
+        return OB_FRAME_CONTEXT_TITLEBAR;
     else if (!g_ascii_strcasecmp("Frame", name))
-      return OB_FRAME_CONTEXT_FRAME;
+        return OB_FRAME_CONTEXT_FRAME;
     else if (!g_ascii_strcasecmp("TLCorner", name))
-      return OB_FRAME_CONTEXT_TLCORNER;
+        return OB_FRAME_CONTEXT_TLCORNER;
     else if (!g_ascii_strcasecmp("TRCorner", name))
-      return OB_FRAME_CONTEXT_TRCORNER;
+        return OB_FRAME_CONTEXT_TRCORNER;
     else if (!g_ascii_strcasecmp("BLCorner", name))
-      return OB_FRAME_CONTEXT_BLCORNER;
+        return OB_FRAME_CONTEXT_BLCORNER;
     else if (!g_ascii_strcasecmp("BRCorner", name))
-      return OB_FRAME_CONTEXT_BRCORNER;
+        return OB_FRAME_CONTEXT_BRCORNER;
     else if (!g_ascii_strcasecmp("Top", name))
-      return OB_FRAME_CONTEXT_TOP;
+        return OB_FRAME_CONTEXT_TOP;
     else if (!g_ascii_strcasecmp("Bottom", name))
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
     else if (!g_ascii_strcasecmp("Handle", name))
-      return OB_FRAME_CONTEXT_BOTTOM;
+        return OB_FRAME_CONTEXT_BOTTOM;
     else if (!g_ascii_strcasecmp("Left", name))
-      return OB_FRAME_CONTEXT_LEFT;
+        return OB_FRAME_CONTEXT_LEFT;
     else if (!g_ascii_strcasecmp("Right", name))
-      return OB_FRAME_CONTEXT_RIGHT;
+        return OB_FRAME_CONTEXT_RIGHT;
     else if (!g_ascii_strcasecmp("Maximize", name))
-      return OB_FRAME_CONTEXT_MAXIMIZE;
+        return OB_FRAME_CONTEXT_MAXIMIZE;
     else if (!g_ascii_strcasecmp("AllDesktops", name))
-      return OB_FRAME_CONTEXT_ALLDESKTOPS;
+        return OB_FRAME_CONTEXT_ALLDESKTOPS;
     else if (!g_ascii_strcasecmp("Shade", name))
-      return OB_FRAME_CONTEXT_SHADE;
+        return OB_FRAME_CONTEXT_SHADE;
     else if (!g_ascii_strcasecmp("Iconify", name))
-      return OB_FRAME_CONTEXT_ICONIFY;
+        return OB_FRAME_CONTEXT_ICONIFY;
     else if (!g_ascii_strcasecmp("Icon", name))
-      return OB_FRAME_CONTEXT_ICON;
+        return OB_FRAME_CONTEXT_ICON;
     else if (!g_ascii_strcasecmp("Close", name))
-      return OB_FRAME_CONTEXT_CLOSE;
+        return OB_FRAME_CONTEXT_CLOSE;
     else if (!g_ascii_strcasecmp("MoveResize", name))
-      return OB_FRAME_CONTEXT_MOVE_RESIZE;
+        return OB_FRAME_CONTEXT_MOVE_RESIZE;
     return OB_FRAME_CONTEXT_NONE;
-  }
+}
 
 ObFrameContext plugin_frame_context(ObClient *client, Window win, gint x, gint y)
-  {
+{
     /* this part is commun to all plugin */
     if (render_plugin->moveresize_in_progress)
-      return OB_FRAME_CONTEXT_MOVE_RESIZE;
+        return OB_FRAME_CONTEXT_MOVE_RESIZE;
     if (win == obt_root(ob_screen))
-      return OB_FRAME_CONTEXT_ROOT;
+        return OB_FRAME_CONTEXT_ROOT;
     if (client == NULL)
-      return OB_FRAME_CONTEXT_NONE;
-    if (win == client->window)
-      {
+        return OB_FRAME_CONTEXT_NONE;
+    if (win == client->window) {
         /* conceptually, this is the desktop, as far as users are
          concerned */
         if (client->type == OB_CLIENT_TYPE_DESKTOP)
-          return OB_FRAME_CONTEXT_DESKTOP;
+            return OB_FRAME_CONTEXT_DESKTOP;
         return OB_FRAME_CONTEXT_CLIENT;
-      }
+    }
     /* this part is specific to the plugin */
-    return render_plugin->frame_context (client->frame , win, x, y);
+    return render_plugin->frame_context(client->frame, win, x, y);
 
-  }
+}
 
 void frame_client_gravity(ObClient *self, gint *x, gint *y)
-  {
-	Strut size = render_plugin->frame_get_size (self->frame);
+{
+    Strut size = render_plugin->frame_get_size(self->frame);
     /* horizontal */
-    switch (self->gravity)
-      {
+    switch (self->gravity) {
     default:
     case NorthWestGravity:
     case SouthWestGravity:
     case WestGravity:
-      break;
+        break;
 
     case NorthGravity:
     case SouthGravity:
     case CenterGravity:
-      /* the middle of the client will be the middle of the frame */
-      *x -= (size.right - size.left) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *x -= (size.right - size.left) / 2;
+        break;
 
     case NorthEastGravity:
     case SouthEastGravity:
     case EastGravity:
-      /* the right side of the client will be the right side of the frame */
-      *x -= size.right + size.left - self->border_width * 2;
-      break;
+        /* the right side of the client will be the right side of the frame */
+        *x -= size.right + size.left - self->border_width * 2;
+        break;
 
     case ForgetGravity:
     case StaticGravity:
-      /* the client's position won't move */
-      *x -= size.left - self->border_width;
-      break;
-      }
+        /* the client's position won't move */
+        *x -= size.left - self->border_width;
+        break;
+    }
 
     /* vertical */
-    switch (self->gravity)
-      {
+    switch (self->gravity) {
     default:
     case NorthWestGravity:
     case NorthEastGravity:
     case NorthGravity:
-      break;
+        break;
 
     case CenterGravity:
     case EastGravity:
     case WestGravity:
-      /* the middle of the client will be the middle of the frame */
-      *y -= (size.bottom - size.top) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *y -= (size.bottom - size.top) / 2;
+        break;
 
     case SouthWestGravity:
     case SouthEastGravity:
     case SouthGravity:
-      /* the bottom of the client will be the bottom of the frame */
-      *y -= size.bottom + size.top - self->border_width * 2;
-      break;
+        /* the bottom of the client will be the bottom of the frame */
+        *y -= size.bottom + size.top - self->border_width * 2;
+        break;
 
     case ForgetGravity:
     case StaticGravity:
-      /* the client's position won't move */
-      *y -= size.top - self->border_width;
-      break;
-      }
-  }
+        /* the client's position won't move */
+        *y -= size.top - self->border_width;
+        break;
+    }
+}
 
 void frame_frame_gravity(ObClient *self, gint *x, gint *y)
-  {
-	Strut size = render_plugin->frame_get_size (self->frame);
+{
+    Strut size = render_plugin->frame_get_size(self->frame);
     /* horizontal */
-    switch (self->gravity)
-      {
+    switch (self->gravity) {
     default:
     case NorthWestGravity:
     case WestGravity:
     case SouthWestGravity:
-      break;
+        break;
     case NorthGravity:
     case CenterGravity:
     case SouthGravity:
-      /* the middle of the client will be the middle of the frame */
-      *x += (size.right - size.left) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *x += (size.right - size.left) / 2;
+        break;
     case NorthEastGravity:
     case EastGravity:
     case SouthEastGravity:
-      /* the right side of the client will be the right side of the frame */
-      *x += size.right + size.left - self->border_width * 2;
-      break;
+        /* the right side of the client will be the right side of the frame */
+        *x += size.right + size.left - self->border_width * 2;
+        break;
     case StaticGravity:
     case ForgetGravity:
-      /* the client's position won't move */
-      *x += size.left - self->border_width;
-      break;
-      }
+        /* the client's position won't move */
+        *x += size.left - self->border_width;
+        break;
+    }
 
     /* vertical */
-    switch (self->gravity)
-      {
+    switch (self->gravity) {
     default:
     case NorthWestGravity:
     case NorthGravity:
     case NorthEastGravity:
-      break;
+        break;
     case WestGravity:
     case CenterGravity:
     case EastGravity:
-      /* the middle of the client will be the middle of the frame */
-      *y += (size.bottom - size.top) / 2;
-      break;
+        /* the middle of the client will be the middle of the frame */
+        *y += (size.bottom - size.top) / 2;
+        break;
     case SouthWestGravity:
     case SouthGravity:
     case SouthEastGravity:
-      /* the bottom of the client will be the bottom of the frame */
-      *y += size.bottom + size.top - self->border_width * 2;
-      break;
+        /* the bottom of the client will be the bottom of the frame */
+        *y += size.bottom + size.top - self->border_width * 2;
+        break;
     case StaticGravity:
     case ForgetGravity:
-      /* the client's position won't move */
-      *y += size.top - self->border_width;
-      break;
-      }
-  }
+        /* the client's position won't move */
+        *y += size.top - self->border_width;
+        break;
+    }
+}
 
 void frame_rect_to_frame(ObClient * self, Rect *r)
-  {
-	Strut size = render_plugin->frame_get_size (self->frame);
+{
+    Strut size = render_plugin->frame_get_size(self->frame);
     r->width += size.left + size.right;
     r->height += size.top + size.bottom;
     frame_client_gravity(self, &r->x, &r->y);
-  }
+}
 
 void frame_rect_to_client(ObClient * self, Rect *r)
-  {
-	Strut size = render_plugin->frame_get_size (self);
+{
+    Strut size = render_plugin->frame_get_size(self);
     r->width -= size.left + size.right;
     r->height -= size.top + size.bottom;
     frame_frame_gravity(self, &r->x, &r->y);
-  }
+}
diff --git a/openbox/engine_interface.h b/openbox/engine_interface.h
index 601b799..e7d4c67 100644
--- a/openbox/engine_interface.h
+++ b/openbox/engine_interface.h
@@ -33,7 +33,7 @@ struct _RrTheme;
 struct _ObClient;
 
 typedef enum
-  {
+{
     OB_FRAME_CONTEXT_NONE,
     OB_FRAME_CONTEXT_DESKTOP,
     OB_FRAME_CONTEXT_ROOT,
@@ -58,11 +58,11 @@ typedef enum
      a move/resize */
     OB_FRAME_CONTEXT_MOVE_RESIZE,
     OB_FRAME_NUM_CONTEXTS
-  } ObFrameContext;
+} ObFrameContext;
 
 /*! The decorations the client window wants to be displayed on it */
 typedef enum
-  {
+{
     OB_FRAME_DECOR_TITLEBAR = 1 << 0, /*!< Display a titlebar */
     OB_FRAME_DECOR_HANDLE = 1 << 1, /*!< Display a handle (bottom) */
     OB_FRAME_DECOR_GRIPS = 1 << 2, /*!< Display grips in the handle */
@@ -75,31 +75,31 @@ typedef enum
     OB_FRAME_DECOR_ALLDESKTOPS = 1 << 7,
     OB_FRAME_DECOR_SHADE = 1 << 8, /*!< Displays a shade button */
     OB_FRAME_DECOR_CLOSE = 1 << 9 /*!< Display a close button */
-  } ObFrameDecorations;
+} ObFrameDecorations;
 
 typedef enum
 {
-	OB_BUTTON_NONE = 0,
-	OB_BUTTON_MAX = 1,
-	OB_BUTTON_CLOSE = 2,
-	OB_BUTTON_DESK = 3,
-	OB_BUTTON_SHADE = 4,
-	OB_BUTTON_ICONIFY = 5
+    OB_BUTTON_NONE = 0,
+    OB_BUTTON_MAX = 1,
+    OB_BUTTON_CLOSE = 2,
+    OB_BUTTON_DESK = 3,
+    OB_BUTTON_SHADE = 4,
+    OB_BUTTON_ICONIFY = 5
 } ObFrameButton;
 
 typedef enum
 {
-	OB_FRAME_STATE_NORMAL,
-	OB_FRAME_STATE_INCONIFIED,
-	OB_FRAME_STATE_SHADED,
-	OB_FRAME_STATE_MAX,
-	OB_FRAME_STATE_MAX_VERT,
-	OB_FRAME_STATE_MAX_HORZ,
-	OB_FRAME_STATE_NO_BORDER
+    OB_FRAME_STATE_NORMAL,
+    OB_FRAME_STATE_INCONIFIED,
+    OB_FRAME_STATE_SHADED,
+    OB_FRAME_STATE_MAX,
+    OB_FRAME_STATE_MAX_VERT,
+    OB_FRAME_STATE_MAX_HORZ,
+    OB_FRAME_STATE_NO_BORDER
 } ObFrameState;
 
 struct _ObFramePlugin
-  {
+{
     gpointer handler; // Currently not used.
 
     gchar * filename;
@@ -128,11 +128,11 @@ struct _ObFramePlugin
     /* Provide the context of the mouse */
     ObFrameContext (*frame_context)(gpointer self, Window win, gint x, gint y);
 
-    void (*frame_set_is_visible) (gpointer, gboolean);
-    void (*frame_set_is_focus) (gpointer, gboolean);
-    void (*frame_set_is_max_vert) (gpointer, gboolean);
-    void (*frame_set_is_max_horz) (gpointer, gboolean);
-    void (*frame_set_is_shaded) (gpointer, gboolean);
+    void (*frame_set_is_visible)(gpointer, gboolean);
+    void (*frame_set_is_focus)(gpointer, gboolean);
+    void (*frame_set_is_max_vert)(gpointer, gboolean);
+    void (*frame_set_is_max_horz)(gpointer, gboolean);
+    void (*frame_set_is_shaded)(gpointer, gboolean);
 
     void (*frame_flash_start)(gpointer self);
     void (*frame_flash_stop)(gpointer self);
@@ -141,32 +141,33 @@ struct _ObFramePlugin
     gboolean (*frame_iconify_animating)(gpointer p);
 
     /* Set the layout wanted by client */
-    void (*frame_set_decorations) (gpointer, ObFrameDecorations);
+    void (*frame_set_decorations)(gpointer, ObFrameDecorations);
 
     /* get the current window area */
-    Rect (*frame_get_window_area) (gpointer);
+    Rect (*frame_get_window_area)(gpointer);
     /* set the requested client area */
-    void (*frame_set_client_area) (gpointer, Rect);
+    void (*frame_set_client_area)(gpointer, Rect);
     /* Draw the frame */
-    void (*frame_update_layout) (gpointer self, gboolean is_resize, gboolean is_fake);
-    void (*frame_update_skin) (gpointer);
+    void (*frame_update_layout)(gpointer self, gboolean is_resize,
+            gboolean is_fake);
+    void (*frame_update_skin)(gpointer);
 
-    void (*frame_set_hover_flag) (gpointer, ObFrameButton);
-    void (*frame_set_press_flag) (gpointer, ObFrameButton);
+    void (*frame_set_hover_flag)(gpointer, ObFrameButton);
+    void (*frame_set_press_flag)(gpointer, ObFrameButton);
 
-    Window (*frame_get_window) (gpointer);
+    Window (*frame_get_window)(gpointer);
 
-    Strut (*frame_get_size) (gpointer);
-    gint (*frame_get_decorations) (gpointer);
+    Strut (*frame_get_size)(gpointer);
+    gint (*frame_get_decorations)(gpointer);
 
-    gboolean (*frame_is_visible) (gpointer);
-    gboolean (*frame_is_max_horz) (gpointer);
-    gboolean (*frame_is_max_vert) (gpointer);
+    gboolean (*frame_is_visible)(gpointer);
+    gboolean (*frame_is_max_horz)(gpointer);
+    gboolean (*frame_is_max_vert)(gpointer);
 
     gint (*load_theme_config)(const RrInstance *inst, const gchar *name,
-        const gchar * path, XrmDatabase db, RrFont *active_window_font,
-        RrFont *inactive_window_font, RrFont *menu_title_font,
-        RrFont *menu_item_font, RrFont *osd_font);
+            const gchar * path, XrmDatabase db, RrFont *active_window_font,
+            RrFont *inactive_window_font, RrFont *menu_title_font,
+            RrFont *menu_item_font, RrFont *osd_font);
 
     /* Filled by openbox-core */
     Display * ob_display;
@@ -179,10 +180,10 @@ struct _ObFramePlugin
     gchar *config_title_layout;
     gboolean moveresize_in_progress;
     struct _ObtMainLoop *ob_main_loop;
-  };
+};
 /* Define how to draw the current windows */
 enum _ObStyle
-  {
+{
     OBSTYLE_DECOR,
     OBSTYLE_NODECOR,
     OBSTYLE_SHADE,
@@ -190,7 +191,7 @@ enum _ObStyle
     OBSTYLE_MAXVERT,
     OBSTYLE_MAXHORIZ,
     OBSTYLE_MAX,
-  };
+};
 
 typedef enum _ObStyle ObStyle;
 typedef struct _ObFramePlugin ObFramePlugin;
@@ -200,13 +201,12 @@ typedef ObFramePlugin * (*ObFramePluginFunc)(void);
 
 /* initialize theme plugin, it read themerc and load
  * the plugin needed */
-ObFramePlugin * init_frame_plugin(const gchar *name,
-    gboolean allow_fallback, RrFont *active_window_font,
-    RrFont *inactive_window_font, RrFont *menu_title_font,
-    RrFont *menu_item_font, RrFont *osd_font);
+ObFramePlugin * init_frame_plugin(const gchar *name, gboolean allow_fallback,
+        RrFont *active_window_font, RrFont *inactive_window_font,
+        RrFont *menu_title_font, RrFont *menu_item_font, RrFont *osd_font);
 
 /* Update plugin data */
-void update_frame_plugin (ObFramePlugin *);
+void update_frame_plugin(ObFramePlugin *);
 
 /* Load modules specified in filename */
 ObFramePlugin * load_frame_plugin(const gchar * filename);
diff --git a/openbox/event.c b/openbox/event.c
index 71193c3..dbc7058 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -889,16 +889,16 @@ static void event_handle_client(ObClient *client, XEvent *e)
                 current_button = OB_BUTTON_MAX;
                 break;
             case OB_FRAME_CONTEXT_CLOSE:
-		current_button = OB_BUTTON_CLOSE;
+        current_button = OB_BUTTON_CLOSE;
                 break;
             case OB_FRAME_CONTEXT_ICONIFY:
-		current_button = OB_BUTTON_ICONIFY;
+        current_button = OB_BUTTON_ICONIFY;
                 break;
             case OB_FRAME_CONTEXT_ALLDESKTOPS:
-		current_button = OB_BUTTON_DESK;
+        current_button = OB_BUTTON_DESK;
                 break;
             case OB_FRAME_CONTEXT_SHADE:
-		current_button = OB_BUTTON_SHADE;
+        current_button = OB_BUTTON_SHADE;
                 break;
             default:
                 /* nothing changes with clicks for any other contexts */
@@ -906,7 +906,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
             }
 
             if (current_button)
-		render_plugin->frame_set_hover_flag (client->frame, current_button);
+        render_plugin->frame_set_hover_flag (client->frame, current_button);
         }
         break;
     case MotionNotify:
@@ -924,19 +924,19 @@ static void event_handle_client(ObClient *client, XEvent *e)
             render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_MAXIMIZE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_MAX);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_MAX);
             break;
         case OB_FRAME_CONTEXT_ALLDESKTOPS:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_DESK);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_DESK);
             break;
         case OB_FRAME_CONTEXT_SHADE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE);
             break;
         case OB_FRAME_CONTEXT_ICONIFY:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY);
             break;
         case OB_FRAME_CONTEXT_CLOSE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE);
             break;
         default:
             break;
@@ -950,22 +950,22 @@ static void event_handle_client(ObClient *client, XEvent *e)
         case OB_FRAME_CONTEXT_TLCORNER:
         case OB_FRAME_CONTEXT_TRCORNER:
             /* we've left the button area inside the titlebar */
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_MAXIMIZE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_ALLDESKTOPS:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_SHADE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_ICONIFY:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_CLOSE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_NONE);
             break;
         case OB_FRAME_CONTEXT_FRAME:
             /* When the mouse leaves an animating window, don't use the
@@ -1002,19 +1002,19 @@ static void event_handle_client(ObClient *client, XEvent *e)
                             e->xcrossing.x, e->xcrossing.y);
         switch (con) {
         case OB_FRAME_CONTEXT_MAXIMIZE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_MAX);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_MAX);
             break;
         case OB_FRAME_CONTEXT_ALLDESKTOPS:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_DESK);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_DESK);
             break;
         case OB_FRAME_CONTEXT_SHADE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_SHADE);
             break;
         case OB_FRAME_CONTEXT_ICONIFY:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_ICONIFY);
             break;
         case OB_FRAME_CONTEXT_CLOSE:
-		render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE);
+        render_plugin->frame_set_hover_flag(client->frame, OB_BUTTON_CLOSE);
             break;
         case OB_FRAME_CONTEXT_FRAME:
             if (grab_on_keyboard())
diff --git a/openbox/focus_cycle.c b/openbox/focus_cycle.c
index 1191e08..af68c37 100644
--- a/openbox/focus_cycle.c
+++ b/openbox/focus_cycle.c
@@ -80,7 +80,7 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
 
     if (interactive) {
         if (cancel) {
-		render_plugin->focus_cycle_target = NULL;
+        render_plugin->focus_cycle_target = NULL;
             goto done_cycle;
         } else if (done)
             goto done_cycle;
@@ -139,7 +139,7 @@ ObClient* focus_cycle(gboolean forward, gboolean all_desktops,
                                        mode);
                 return render_plugin->focus_cycle_target;
             } else if (ft != render_plugin->focus_cycle_target) {
-		render_plugin->focus_cycle_target = ft;
+        render_plugin->focus_cycle_target = ft;
                 done = TRUE;
                 break;
             }
@@ -271,7 +271,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows,
     ObClient *ret = NULL;
 
     if (cancel) {
-	render_plugin->focus_cycle_target = NULL;
+    render_plugin->focus_cycle_target = NULL;
         goto done_cycle;
     } else if (done && interactive)
         goto done_cycle;
@@ -306,7 +306,7 @@ ObClient* focus_directional_cycle(ObDirection dir, gboolean dock_windows,
     }
 
     if (ft && ft != render_plugin->focus_cycle_target) {/* prevents flicker */
-	render_plugin->focus_cycle_target = ft;
+    render_plugin->focus_cycle_target = ft;
         if (!interactive)
             goto done_cycle;
         focus_cycle_draw_indicator(showbar ? ft : NULL);
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 4031f7b..55be9d7 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -381,8 +381,8 @@ gint main(gint argc, gchar **argv)
 
     if (render_plugin)
     {
-	//RrThemeFree(render_plugin->ob_rr_theme);
-	RrInstanceFree(render_plugin->ob_rr_inst);
+    //RrThemeFree(render_plugin->ob_rr_theme);
+    RrInstanceFree(render_plugin->ob_rr_inst);
     }
     session_shutdown(being_replaced);
 
diff --git a/openbox/screen.c b/openbox/screen.c
index 003bf07..b525c57 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -571,9 +571,9 @@ static void screen_fallback_focus(void)
         if (c->can_focus) {
             /* reduce flicker by hiliting now rather than waiting for the
                server FocusIn event */
-		render_plugin->frame_set_is_focus (c->frame, TRUE);
-		render_plugin->frame_update_layout (c->frame, FALSE, FALSE);
-		render_plugin->frame_update_skin (c->frame);
+        render_plugin->frame_set_is_focus (c->frame, TRUE);
+        render_plugin->frame_update_layout (c->frame, FALSE, FALSE);
+        render_plugin->frame_update_skin (c->frame);
             /* do this here so that if you switch desktops to a window with
                helper windows then the helper windows won't flash */
             client_bring_helper_windows(c);
@@ -1228,9 +1228,9 @@ void screen_show_desktop(gboolean show, ObClient *show_only)
             if (c->can_focus) {
                 /* reduce flicker by hiliting now rather than waiting for the
                    server FocusIn event */
-		render_plugin->frame_set_is_focus(c->frame, TRUE);
-		render_plugin->frame_update_layout (c->frame, FALSE, FALSE);
-		render_plugin->frame_update_skin (c->frame);
+        render_plugin->frame_set_is_focus(c->frame, TRUE);
+        render_plugin->frame_update_layout (c->frame, FALSE, FALSE);
+        render_plugin->frame_update_skin (c->frame);
             }
         }
     }
diff --git a/tests/aspect.c b/tests/aspect.c
index 1ae3a85..1b8bf9f 100644
--- a/tests/aspect.c
+++ b/tests/aspect.c
@@ -40,8 +40,8 @@ int main () {
   xswamask = CWWinGravity;
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, xswamask, &xswa);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, xswamask, &xswa);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/big.c b/tests/big.c
index bc17c5a..32b6d30 100644
--- a/tests/big.c
+++ b/tests/big.c
@@ -35,8 +35,8 @@ int main () {
   }
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/borderchange.c b/tests/borderchange.c
index 56d5500..82b7573 100644
--- a/tests/borderchange.c
+++ b/tests/borderchange.c
@@ -35,8 +35,8 @@ int main () {
   }
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
   XSelectInput(display, win, ExposureMask | StructureNotifyMask);
diff --git a/tests/extentsrequest.c b/tests/extentsrequest.c
index 3fb0c7a..341cee7 100644
--- a/tests/extentsrequest.c
+++ b/tests/extentsrequest.c
@@ -43,8 +43,8 @@ int main () {
   _extents = XInternAtom(display, "_NET_FRAME_EXTENTS", False);
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
   XSelectInput(display, win, PropertyChangeMask);
 
   printf("requesting for type normal\n");
@@ -101,7 +101,7 @@ int main () {
   msg.xclient.data.l[3] = 0l;
   msg.xclient.data.l[4] = 0l;
   XSendEvent(display, RootWindow(display, 0), False,
-	     SubstructureNotifyMask | SubstructureRedirectMask, &msg);
+         SubstructureNotifyMask | SubstructureRedirectMask, &msg);
   XFlush(display);
 
   printf("waiting for extents\n");
diff --git a/tests/fallback.c b/tests/fallback.c
index 721ed31..758727d 100644
--- a/tests/fallback.c
+++ b/tests/fallback.c
@@ -35,7 +35,7 @@ int main () {
 
   one = XCreateWindow(display, RootWindow(display, 0),
                       0,0,200,200, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
   two = XCreateWindow(display, RootWindow(display, 0),
                       0,0,150,150, 10, CopyFromParent, CopyFromParent,
                       CopyFromParent, 0, 0);
diff --git a/tests/fullscreen.c b/tests/fullscreen.c
index 6907cab..a7f6651 100644
--- a/tests/fullscreen.c
+++ b/tests/fullscreen.c
@@ -39,8 +39,8 @@ int main () {
   _net_fs = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", False);
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
@@ -60,7 +60,7 @@ int main () {
   msg.xclient.data.l[3] = 0l;
   msg.xclient.data.l[4] = 0l;
   XSendEvent(display, RootWindow(display, 0), False,
-	     SubstructureNotifyMask | SubstructureRedirectMask, &msg);
+         SubstructureNotifyMask | SubstructureRedirectMask, &msg);
   XFlush(display);
   sleep(2);
 
@@ -76,7 +76,7 @@ int main () {
   msg.xclient.data.l[3] = 0l;
   msg.xclient.data.l[4] = 0l;
   XSendEvent(display, RootWindow(display, 0), False,
-	     SubstructureNotifyMask | SubstructureRedirectMask, &msg);
+         SubstructureNotifyMask | SubstructureRedirectMask, &msg);
 
   XSelectInput(display, win, ExposureMask | StructureNotifyMask);
 
diff --git a/tests/grav.c b/tests/grav.c
index 772fec2..26874b0 100644
--- a/tests/grav.c
+++ b/tests/grav.c
@@ -35,8 +35,8 @@ int main () {
   }
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, b, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, b, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   hints = XAllocSizeHints();
   hints->flags = PWinGravity;
diff --git a/tests/groupmodal.c b/tests/groupmodal.c
index 12057eb..86c9eb6 100644
--- a/tests/groupmodal.c
+++ b/tests/groupmodal.c
@@ -40,11 +40,11 @@ int main () {
 
   group = XCreateWindow(display, RootWindow(display, 0),
                         0,0,1,1, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   one = XCreateWindow(display, RootWindow(display, 0),
                       0,0,300,300, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
   two = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
                       CopyFromParent, 0, 0);
diff --git a/tests/grouptran.c b/tests/grouptran.c
index 320da2f..9ff575b 100644
--- a/tests/grouptran.c
+++ b/tests/grouptran.c
@@ -36,11 +36,11 @@ int main () {
 
   group = XCreateWindow(display, RootWindow(display, 0),
                         0,0,1,1, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   one = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
   two = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
                       CopyFromParent, 0, 0);
diff --git a/tests/grouptran2.c b/tests/grouptran2.c
index 4cd6c58..07964ab 100644
--- a/tests/grouptran2.c
+++ b/tests/grouptran2.c
@@ -36,11 +36,11 @@ int main () {
 
   group = XCreateWindow(display, RootWindow(display, 0),
                         0,0,1,1, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   main = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
   grouptran = XCreateWindow(display, RootWindow(display, 0),
                             10,10,80,180, 10, CopyFromParent, CopyFromParent,
                             CopyFromParent, 0, 0);
diff --git a/tests/grouptrancircular.c b/tests/grouptrancircular.c
index 3853aef..97dccc9 100644
--- a/tests/grouptrancircular.c
+++ b/tests/grouptrancircular.c
@@ -36,11 +36,11 @@ int main () {
 
   group = XCreateWindow(display, RootWindow(display, 0),
                         0,0,1,1, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   one = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
   two = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
                       CopyFromParent, 0, 0);
diff --git a/tests/grouptrancircular2.c b/tests/grouptrancircular2.c
index 1956c8f..7bcee4b 100644
--- a/tests/grouptrancircular2.c
+++ b/tests/grouptrancircular2.c
@@ -36,11 +36,11 @@ int main () {
 
   group = XCreateWindow(display, RootWindow(display, 0),
                         0,0,1,1, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   one = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
   two = XCreateWindow(display, RootWindow(display, 0),
                       0,0,100,100, 10, CopyFromParent, CopyFromParent,
                       CopyFromParent, 0, 0);
diff --git a/tests/mapiconic.c b/tests/mapiconic.c
index 76455a0..a814f66 100644
--- a/tests/mapiconic.c
+++ b/tests/mapiconic.c
@@ -44,8 +44,8 @@ int main () {
   wm_state = XInternAtom(display, "WM_STATE", False);
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   hints = XAllocWMHints();
   hints->flags = StateHint;
diff --git a/tests/modal.c b/tests/modal.c
index edbd5cc..2c962d5 100644
--- a/tests/modal.c
+++ b/tests/modal.c
@@ -39,18 +39,18 @@ int main () {
   modal = XInternAtom(display, "_NET_WM_STATE_MODAL", True);
 
   parent = XCreateWindow(display, RootWindow(display, 0),
-			 x, y, w, h, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             x, y, w, h, 10, CopyFromParent, CopyFromParent,
+             CopyFromParent, 0, 0);
   child = XCreateWindow(display, RootWindow(display, 0),
-			x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
-			CopyFromParent, 0, 0);
+            x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
+            CopyFromParent, 0, 0);
 
   XSetWindowBackground(display,parent,WhitePixel(display,0));
   XSetWindowBackground(display,child,BlackPixel(display,0));
 
   XSetTransientForHint(display, child, parent);
   XChangeProperty(display, child, state, XA_ATOM, 32,
-		  PropModeReplace, (unsigned char*)&modal, 1);
+          PropModeReplace, (unsigned char*)&modal, 1);
 
   XMapWindow(display, parent);
   XMapWindow(display, child);
diff --git a/tests/modal2.c b/tests/modal2.c
index e7afb9b..b5e0692 100644
--- a/tests/modal2.c
+++ b/tests/modal2.c
@@ -40,11 +40,11 @@ int main () {
   modal = XInternAtom(display, "_NET_WM_STATE_MODAL", True);
 
   parent = XCreateWindow(display, RootWindow(display, 0),
-			 x, y, w, h, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             x, y, w, h, 10, CopyFromParent, CopyFromParent,
+             CopyFromParent, 0, 0);
   child = XCreateWindow(display, RootWindow(display, 0),
-			x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
-			CopyFromParent, 0, 0);
+            x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
+            CopyFromParent, 0, 0);
 
   XSetWindowBackground(display,parent,WhitePixel(display,0));
   XSetWindowBackground(display,child,BlackPixel(display,0));
@@ -64,7 +64,7 @@ int main () {
   ce.xclient.data.l[1] = modal;
   ce.xclient.data.l[2] = 0;
   XSendEvent(display, RootWindow(display, DefaultScreen(display)),
-	     False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
+         False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
 
   while (1) {
     XNextEvent(display, &report);
diff --git a/tests/modal3.c b/tests/modal3.c
index 76c8219..6679351 100644
--- a/tests/modal3.c
+++ b/tests/modal3.c
@@ -40,11 +40,11 @@ int main () {
   modal = XInternAtom(display, "_NET_WM_STATE_MODAL", True);
 
   parent = XCreateWindow(display, RootWindow(display, 0),
-			 x, y, w, h, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             x, y, w, h, 10, CopyFromParent, CopyFromParent,
+             CopyFromParent, 0, 0);
   child = XCreateWindow(display, RootWindow(display, 0),
-			x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
-			CopyFromParent, 0, 0);
+            x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
+            CopyFromParent, 0, 0);
 
   XSetWindowBackground(display,parent,WhitePixel(display,0));
   XSetWindowBackground(display,child,BlackPixel(display,0));
@@ -64,11 +64,11 @@ int main () {
   ce.xclient.data.l[1] = modal;
   ce.xclient.data.l[2] = 0;
   XSendEvent(display, RootWindow(display, DefaultScreen(display)),
-	     False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
+         False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
 
   ce.xclient.data.l[0] = 0;
   XSendEvent(display, RootWindow(display, DefaultScreen(display)),
-	     False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
+         False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
 
   while (1) {
     XNextEvent(display, &report);
diff --git a/tests/noresize.c b/tests/noresize.c
index c98295b..f5c46b6 100644
--- a/tests/noresize.c
+++ b/tests/noresize.c
@@ -40,8 +40,8 @@ int main () {
   xswamask = CWWinGravity;
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 0, CopyFromParent, CopyFromParent,
-		      CopyFromParent, xswamask, &xswa);
+              x, y, w, h, 0, CopyFromParent, CopyFromParent,
+              CopyFromParent, xswamask, &xswa);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/override.c b/tests/override.c
index 44c3a00..1f52a17 100644
--- a/tests/override.c
+++ b/tests/override.c
@@ -38,8 +38,8 @@ int main () {
   xswamask = CWOverrideRedirect;
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, xswamask, &xswa);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, xswamask, &xswa);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/resize.c b/tests/resize.c
index e3a84bb..8e9618c 100644
--- a/tests/resize.c
+++ b/tests/resize.c
@@ -34,8 +34,8 @@ int main () {
   }
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/shape.c b/tests/shape.c
index c3de7da..9f28ca2 100644
--- a/tests/shape.c
+++ b/tests/shape.c
@@ -40,8 +40,8 @@ int main () {
   }
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
   xrect.x = 10;
   xrect.y = 10;
   xrect.width = w - 20;
diff --git a/tests/skiptaskbar.c b/tests/skiptaskbar.c
index 1b24616..002c81c 100644
--- a/tests/skiptaskbar.c
+++ b/tests/skiptaskbar.c
@@ -40,12 +40,12 @@ int main () {
 
   win = XCreateWindow(display, RootWindow(display, 0),
                       x, y, w, h, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
   XChangeProperty(display, win, state, XA_ATOM, 32,
-		  PropModeReplace, (unsigned char*)&skip, 1);
+          PropModeReplace, (unsigned char*)&skip, 1);
 
   XMapWindow(display, win);
   XFlush(display);
diff --git a/tests/skiptaskbar2.c b/tests/skiptaskbar2.c
index 3fb2231..25a16f9 100644
--- a/tests/skiptaskbar2.c
+++ b/tests/skiptaskbar2.c
@@ -40,7 +40,7 @@ int main () {
 
   win = XCreateWindow(display, RootWindow(display, 0),
                       x, y, w, h, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             CopyFromParent, 0, 0);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
@@ -58,7 +58,7 @@ int main () {
   ce.xclient.data.l[1] = skip;
   ce.xclient.data.l[2] = 0;
   XSendEvent(display, RootWindow(display, DefaultScreen(display)),
-	     False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
+         False, SubstructureNotifyMask | SubstructureRedirectMask, &ce);
 
   while (1) {
     XNextEvent(display, &report);
diff --git a/tests/stacking.c b/tests/stacking.c
index 4d2bda9..c5a7de9 100644
--- a/tests/stacking.c
+++ b/tests/stacking.c
@@ -39,8 +39,8 @@ int main () {
                         x, y, w, h, 10, CopyFromParent, CopyFromParent,
                         CopyFromParent, 0, 0);
   parent = XCreateWindow(display, RootWindow(display, 0),
-			 x, y, w, h, 10, CopyFromParent, CopyFromParent,
-			 CopyFromParent, 0, 0);
+             x, y, w, h, 10, CopyFromParent, CopyFromParent,
+             CopyFromParent, 0, 0);
   child1 = XCreateWindow(display, RootWindow(display, 0),
                          x, y, w/2, h/2, 10, CopyFromParent, CopyFromParent,
                          CopyFromParent, 0, 0);
diff --git a/tests/strut.c b/tests/strut.c
index 15a4860..017dc08 100644
--- a/tests/strut.c
+++ b/tests/strut.c
@@ -40,8 +40,8 @@ int main () {
   _net_strut = XInternAtom(display, "_NET_WM_STRUT", False);
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/title.c b/tests/title.c
index 799bdf5..aa19b0d 100644
--- a/tests/title.c
+++ b/tests/title.c
@@ -49,8 +49,8 @@ int main (int argc, char **argv) {
     nameenc = XInternAtom(display,"STRING",False);
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
diff --git a/tests/urgent.c b/tests/urgent.c
index c29e300..3c7a982 100644
--- a/tests/urgent.c
+++ b/tests/urgent.c
@@ -41,8 +41,8 @@ int main () {
   _net_fs = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", False);
 
   win = XCreateWindow(display, RootWindow(display, 0),
-		      x, y, w, h, 10, CopyFromParent, CopyFromParent,
-		      CopyFromParent, 0, NULL);
+              x, y, w, h, 10, CopyFromParent, CopyFromParent,
+              CopyFromParent, 0, NULL);
 
   XSetWindowBackground(display,win,WhitePixel(display,0));
 
-- 
1.5.3.7

