So, when using the +default+ layout, you will have a 2 pixel border on
each side, making the window_rect +{ "x": 2, "y": 0, "width": 632,
"height": 366 }+ (for example).
+deco_rect (map)::
+ The coordinates of the *window decoration* inside its container. These
+ coordinates are relative to the container and do not include the actual
+ client window.
geometry (map)::
The original geometry the window specified when i3 mapped it. Used when
switching a window to floating mode, for example.
y(integer, con->current_border_width);
dump_rect(gen, "rect", con->rect);
+ dump_rect(gen, "deco_rect", con->deco_rect);
dump_rect(gen, "window_rect", con->window_rect);
dump_rect(gen, "geometry", con->geometry);
static Con *to_focus;
static bool parsing_swallows;
static bool parsing_rect;
+static bool parsing_deco_rect;
static bool parsing_window_rect;
static bool parsing_geometry;
static bool parsing_focus;
match_init(current_swallow);
TAILQ_INSERT_TAIL(&(json_node->swallow_head), current_swallow, matches);
} else {
- if (!parsing_rect && !parsing_window_rect && !parsing_geometry) {
+ if (!parsing_rect && !parsing_deco_rect && !parsing_window_rect && !parsing_geometry) {
if (last_key && strcasecmp(last_key, "floating_nodes") == 0) {
DLOG("New floating_node\n");
Con *ws = con_get_workspace(json_node);
static int json_end_map(void *ctx) {
LOG("end of map\n");
- if (!parsing_swallows && !parsing_rect && !parsing_window_rect && !parsing_geometry) {
+ if (!parsing_swallows && !parsing_rect && !parsing_deco_rect && !parsing_window_rect && !parsing_geometry) {
/* Set a few default values to simplify manually crafted layout files. */
if (json_node->layout == L_DEFAULT) {
DLOG("Setting layout = L_SPLITH\n");
x_con_init(json_node, json_node->depth);
json_node = json_node->parent;
}
- if (parsing_rect)
- parsing_rect = false;
- if (parsing_window_rect)
- parsing_window_rect = false;
- if (parsing_geometry)
- parsing_geometry = false;
+
+ parsing_rect = false;
+ parsing_deco_rect = false;
+ parsing_window_rect = false;
+ parsing_geometry = false;
return 1;
}
if (strcasecmp(last_key, "rect") == 0)
parsing_rect = true;
+ if (strcasecmp(last_key, "deco_rect") == 0)
+ parsing_deco_rect = true;
+
if (strcasecmp(last_key, "window_rect") == 0)
parsing_window_rect = true;
to_focus = NULL;
parsing_swallows = false;
parsing_rect = false;
+ parsing_deco_rect = false;
parsing_window_rect = false;
parsing_geometry = false;
parsing_focus = false;