]> git.sur5r.net Git - i3/i3/commitdiff
Rename decoration_border to child_border. 2156/head
authorIngo Bürk <ingo.buerk@tngtech.com>
Sat, 9 Jan 2016 21:47:33 +0000 (16:47 -0500)
committerIngo Bürk <ingo.buerk@tngtech.com>
Sat, 9 Jan 2016 21:47:33 +0000 (16:47 -0500)
fixes #2154

docs/userguide
include/config.h
include/config_directives.h
parser-specs/config.spec
src/config.c
src/config_directives.c
src/x.c

index e8dee1037fdfcb0db474c63e2a47a12211fa1f47..55568b6585d49a587e3ac75b4da1801e3b030e29 100644 (file)
@@ -836,9 +836,9 @@ workspace "2: vim" output VGA1
 You can change all colors which i3 uses to draw the window decorations.
 
 *Syntax*:
--------------------------------------------------------------------------
-<colorclass> <border> <background> <text> <indicator> <decoration_border>
--------------------------------------------------------------------------
+--------------------------------------------------------------------
+<colorclass> <border> <background> <text> <indicator> <child_border>
+--------------------------------------------------------------------
 
 Where colorclass can be one of:
 
@@ -863,8 +863,8 @@ client.background::
 Colors are in HTML hex format (#rrggbb), see the following example:
 
 *Examples (default colors)*:
----------------------------------------------------------
-# class                 border  backgr. text    indicator decoration_border
+----------------------------------------------------------------------
+# class                 border  backgr. text    indicator child_border
 client.focused          #4c7899 #285577 #ffffff #2e9ef4   #285577
 client.focused_inactive #333333 #5f676a #ffffff #484e50   #5f676a
 client.unfocused        #333333 #222222 #888888 #292d2e   #222222
@@ -872,10 +872,10 @@ client.urgent           #2f343a #900000 #ffffff #900000   #900000
 client.placeholder      #000000 #0c0c0c #ffffff #000000   #0c0c0c
 
 client.background       #ffffff
----------------------------------------------------------
+----------------------------------------------------------------------
 
 Note that for the window decorations, the color around the child window is the
-"decoration_border", and "border" color is only the two thin lines around the
+"child_border", and "border" color is only the two thin lines around the
 titlebar.
 
 The indicator color is used for indicating where a new window will be opened.
index d5465c3f06858cff50459dca962e369aefc76caf..acdd2c8999ddc40f57e2830b7f97c37c4d9c059a 100644 (file)
@@ -54,7 +54,7 @@ struct Colortriple {
     color_t background;
     color_t text;
     color_t indicator;
-    color_t decoration_border;
+    color_t child_border;
 };
 
 /**
index fd8a4208f0fbbc2ab677f7f00c48a94895f53eb7..bcbea111572094c56e8337729424d955b209e8e4 100644 (file)
@@ -59,7 +59,7 @@ CFGFUN(no_focus);
 CFGFUN(ipc_socket, const char *path);
 CFGFUN(restart_state, const char *path);
 CFGFUN(popup_during_fullscreen, const char *value);
-CFGFUN(color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator, const char *decoration_border);
+CFGFUN(color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator, const char *child_border);
 CFGFUN(color_single, const char *colorclass, const char *color);
 CFGFUN(floating_modifier, const char *modifiers);
 CFGFUN(new_window, const char *windowtype, const char *border, const long width);
index 1e1b52e24c19727c8fb8feba4d3efdcc3156be04..f5275028de4235ca99891263e6c11f56cdb9dd85 100644 (file)
@@ -282,13 +282,13 @@ state COLOR_TEXT:
 
 state COLOR_INDICATOR:
   indicator = word
-      -> COLOR_DECORATION_BORDER
+      -> COLOR_CHILD_BORDER
   end
       -> call cfg_color($colorclass, $border, $background, $text, NULL, NULL)
 
-state COLOR_DECORATION_BORDER:
-  decoration_border = word
-      -> call cfg_color($colorclass, $border, $background, $text, $indicator, $decoration_border)
+state COLOR_CHILD_BORDER:
+  child_border = word
+      -> call cfg_color($colorclass, $border, $background, $text, $indicator, $child_border)
   end
       -> call cfg_color($colorclass, $border, $background, $text, $indicator, NULL)
 
index a11114632ccc921a09c539153fe8fd8c198dfff2..fb2feda86e04170ed97413c96480bf41c14ed887 100644 (file)
@@ -193,13 +193,13 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
     memset(&config, 0, sizeof(config));
 
 /* Initialize default colors */
-#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator)     \
-    do {                                                           \
-        x.border = draw_util_hex_to_color(cborder);                \
-        x.background = draw_util_hex_to_color(cbackground);        \
-        x.text = draw_util_hex_to_color(ctext);                    \
-        x.indicator = draw_util_hex_to_color(cindicator);          \
-        x.decoration_border = draw_util_hex_to_color(cbackground); \
+#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \
+    do {                                                       \
+        x.border = draw_util_hex_to_color(cborder);            \
+        x.background = draw_util_hex_to_color(cbackground);    \
+        x.text = draw_util_hex_to_color(ctext);                \
+        x.indicator = draw_util_hex_to_color(cindicator);      \
+        x.child_border = draw_util_hex_to_color(cbackground);  \
     } while (0)
 
     config.client.background = draw_util_hex_to_color("#000000");
index 0d4b3d31f2fa5cb702fc132c2c276b8536094685..e92ef1d9fb38d49eb082a31fa1f3436c38a4c0c1 100644 (file)
@@ -338,22 +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); \
-            } else {                                                                                   \
-                config.client.classname.decoration_border = config.client.classname.background;        \
-            }                                                                                          \
-        }                                                                                              \
+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);
diff --git a/src/x.c b/src/x.c
index a14c25fa088d6004cedd156e0c0ce4b97bc6a3e8..f44bc37a9f7dffb3d2378b8e99776f25be3dcb88 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -464,24 +464,22 @@ void x_draw_decoration(Con *con) {
          * rectangle because some childs are not freely resizable and we want
          * their background color to "shine through". */
         if (!(borders_to_hide & ADJ_LEFT_SCREEN_EDGE)) {
-            draw_util_rectangle(conn, &(con->frame_buffer), p->color->decoration_border, 0, 0, br.x, r->height);
+            draw_util_rectangle(conn, &(con->frame_buffer), p->color->child_border, 0, 0, br.x, r->height);
         }
         if (!(borders_to_hide & ADJ_RIGHT_SCREEN_EDGE)) {
             draw_util_rectangle(conn, &(con->frame_buffer),
-                                p->color->decoration_border, r->width + (br.width + br.x), 0,
+                                p->color->child_border, r->width + (br.width + br.x), 0,
                                 -(br.width + br.x), r->height);
         }
         if (!(borders_to_hide & ADJ_LOWER_SCREEN_EDGE)) {
             draw_util_rectangle(conn, &(con->frame_buffer),
-                                p->color->decoration_border, br.x, r->height + (br.height +
-                                                                                br.y),
+                                p->color->child_border, br.x, r->height + (br.height + br.y),
                                 r->width + br.width, -(br.height + br.y));
         }
         /* pixel border needs an additional line at the top */
         if (p->border_style == BS_PIXEL && !(borders_to_hide & ADJ_UPPER_SCREEN_EDGE)) {
             draw_util_rectangle(conn, &(con->frame_buffer),
-                                p->color->decoration_border, br.x, 0, r->width + br.width,
-                                br.y);
+                                p->color->child_border, br.x, 0, r->width + br.width, br.y);
         }
 
         /* Highlight the side of the border at which the next window will be