diff options
author | Ryan Dwyer <[email protected]> | 2018-11-17 18:32:03 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-11-17 21:29:42 +1000 |
commit | be9348d25c9556bdabb83d964a8761f920fc4a11 (patch) | |
tree | c06bde3d10e9bfea04acdd9b055cd596f13d4522 /sway/ipc-json.c | |
parent | cb63321de6b663530a5b27f323363843cd2720a7 (diff) |
Move view {x,y,width,height} into container struct
This renames/moves the following properties:
* sway_view.{x,y,width,height} ->
sway_container.content_{x,y,width,height}
* This is required to support placeholder containers as they don't
have a view.
* sway_container_state.view_{x,y,width,height} ->
sway_container_state.content_{x,y,width,height}
* To remain consistent with the above.
* sway_container_state.con_{x,y,width,height} ->
sway_container_state.{x,y,width,height}
* The con prefix was there to give it contrast from the view
properties, and is no longer useful.
The function container_set_geometry_from_floating_view has also been
renamed to container_set_geometry_from_content.
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 4d9a87d8..110b958a 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -246,10 +246,10 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object json_object_object_add(object, "marks", marks); struct wlr_box window_box = { - c->view->x - c->x, + c->content_x - c->x, (c->current.border == B_PIXEL) ? c->current.border_thickness : 0, - c->view->width, - c->view->height + c->content_width, + c->content_height }; json_object_object_add(object, "window_rect", ipc_json_create_rect(&window_box)); @@ -258,7 +258,7 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object if (c->current.border == B_NORMAL) { deco_box.width = c->width; - deco_box.height = c->view->y - c->y; + deco_box.height = c->content_y - c->y; } json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box)); |