summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
Diffstat (limited to 'openbox')
-rw-r--r--openbox/config.c8
-rw-r--r--openbox/config.h3
-rw-r--r--openbox/frame.c5
3 files changed, 14 insertions, 2 deletions
diff --git a/openbox/config.c b/openbox/config.c
index 5089a335..d9c9789e 100644
--- a/openbox/config.c
+++ b/openbox/config.c
@@ -9,6 +9,8 @@ gboolean config_focus_popup;
char *config_theme;
+gchar *config_title_layout;
+
int config_desktops_num;
GSList *config_desktops_names;
@@ -52,6 +54,10 @@ static void parse_theme(xmlDocPtr doc, xmlNodePtr node, void *d)
g_free(config_theme);
config_theme = parse_string(doc, n);
}
+ if ((n = parse_find_node("titlelayout", node))) {
+ g_free(config_title_layout);
+ config_title_layout = parse_string(doc, n);
+ }
}
static void parse_desktops(xmlDocPtr doc, xmlNodePtr node, void *d)
@@ -164,6 +170,8 @@ void config_startup()
config_theme = NULL;
+ config_title_layout = g_strdup("NLIMC");
+
parse_register("theme", parse_theme, NULL);
config_desktops_num = 4;
diff --git a/openbox/config.h b/openbox/config.h
index 79f8432c..0c317dac 100644
--- a/openbox/config.h
+++ b/openbox/config.h
@@ -47,6 +47,9 @@ extern guint config_dock_hide_timeout;
/* The name of the theme */
char *config_theme;
+/* Titlebar button layout */
+gchar *config_title_layout;
+
/*! The number of desktops */
extern int config_desktops_num;
/*! Names for the desktops */
diff --git a/openbox/frame.c b/openbox/frame.c
index 05ac3c71..a66bef93 100644
--- a/openbox/frame.c
+++ b/openbox/frame.c
@@ -2,6 +2,7 @@
#include "client.h"
#include "openbox.h"
#include "extensions.h"
+#include "config.h"
#include "framerender.h"
#include "render/theme.h"
@@ -429,7 +430,7 @@ static void layout_title(ObFrame *self)
/* figure out whats being shown, and the width of the label */
self->label_width = self->width - (ob_rr_theme->bevel + 1) * 2;
- for (lc = ob_rr_theme->title_layout; *lc != '\0'; ++lc) {
+ for (lc = config_title_layout; *lc != '\0'; ++lc) {
switch (*lc) {
case 'N':
if (n) { *lc = ' '; break; } /* rm duplicates */
@@ -487,7 +488,7 @@ static void layout_title(ObFrame *self)
if (!c) XUnmapWindow(ob_display, self->close);
x = ob_rr_theme->bevel + 1;
- for (lc = ob_rr_theme->title_layout; *lc != '\0'; ++lc) {
+ for (lc = config_title_layout; *lc != '\0'; ++lc) {
switch (*lc) {
case 'N':
if (!n) break;