]> git.sur5r.net Git - i3/i3/blobdiff - src/config_directives.c
Rename decoration_border to child_border.
[i3/i3] / src / config_directives.c
index fcc480945efc33cf2ade27dab37007bfbd548b14..e92ef1d9fb38d49eb082a31fa1f3436c38a4c0c1 100644 (file)
@@ -261,6 +261,7 @@ CFGFUN(workspace_back_and_forth, const char *value) {
 }
 
 CFGFUN(fake_outputs, const char *outputs) {
+    free(config.fake_outputs);
     config.fake_outputs = sstrdup(outputs);
 }
 
@@ -313,10 +314,12 @@ CFGFUN(workspace, const char *workspace, const char *output) {
 }
 
 CFGFUN(ipc_socket, const char *path) {
+    free(config.ipc_socket_path);
     config.ipc_socket_path = sstrdup(path);
 }
 
 CFGFUN(restart_state, const char *path) {
+    free(config.restart_state_path);
     config.restart_state_path = sstrdup(path);
 }
 
@@ -335,20 +338,22 @@ CFGFUN(color_single, const char *colorclass, const char *color) {
     config.client.background = draw_util_hex_to_color(color);
 }
 
-CFGFUN(color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator, const char *decoration_border) {
-#define APPLY_COLORS(classname)                                                                        \
-    do {                                                                                               \
-        if (strcmp(colorclass, "client." #classname) == 0) {                                           \
-            config.client.classname.border = draw_util_hex_to_color(border);                           \
-            config.client.classname.background = draw_util_hex_to_color(background);                   \
-            config.client.classname.text = draw_util_hex_to_color(text);                               \
-            if (indicator != NULL) {                                                                   \
-                config.client.classname.indicator = draw_util_hex_to_color(indicator);                 \
-            }                                                                                          \
-            if (decoration_border != NULL) {                                                           \
-                config.client.classname.decoration_border = draw_util_hex_to_color(decoration_border); \
-            }                                                                                          \
-        }                                                                                              \
+CFGFUN(color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator, const char *child_border) {
+#define APPLY_COLORS(classname)                                                              \
+    do {                                                                                     \
+        if (strcmp(colorclass, "client." #classname) == 0) {                                 \
+            config.client.classname.border = draw_util_hex_to_color(border);                 \
+            config.client.classname.background = draw_util_hex_to_color(background);         \
+            config.client.classname.text = draw_util_hex_to_color(text);                     \
+            if (indicator != NULL) {                                                         \
+                config.client.classname.indicator = draw_util_hex_to_color(indicator);       \
+            }                                                                                \
+            if (child_border != NULL) {                                                      \
+                config.client.classname.child_border = draw_util_hex_to_color(child_border); \
+            } else {                                                                         \
+                config.client.classname.child_border = config.client.classname.background;   \
+            }                                                                                \
+        }                                                                                    \
     } while (0)
 
     APPLY_COLORS(focused_inactive);