From be9348d25c9556bdabb83d964a8761f920fc4a11 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 17 Nov 2018 18:32:03 +1000 Subject: 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. --- include/sway/tree/container.h | 14 ++++++++------ include/sway/tree/view.h | 4 ---- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index d3155eb3..f907aad2 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -41,8 +41,8 @@ enum wlr_direction; struct sway_container_state { // Container properties enum sway_container_layout layout; - double con_x, con_y; - double con_width, con_height; + double x, y; + double width, height; bool is_fullscreen; @@ -60,9 +60,8 @@ struct sway_container_state { bool border_left; bool border_right; - // View properties - double view_x, view_y; - double view_width, view_height; + double content_x, content_y; + double content_width, content_height; }; struct sway_container { @@ -89,6 +88,9 @@ struct sway_container { double saved_x, saved_y; double saved_width, saved_height; + double content_x, content_y; + int content_width, content_height; + bool is_fullscreen; enum sway_container_border border; @@ -210,7 +212,7 @@ void container_init_floating(struct sway_container *container); void container_set_floating(struct sway_container *container, bool enable); -void container_set_geometry_from_floating_view(struct sway_container *con); +void container_set_geometry_from_content(struct sway_container *con); /** * Determine if the given container is itself floating. diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 4a8c3cb1..8f045c6a 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -67,10 +67,6 @@ struct sway_view { pid_t pid; - // Geometry of the view itself (excludes borders) in layout coordinates - double x, y; - int width, height; - double saved_x, saved_y; int saved_width, saved_height; -- cgit v1.2.3-54-g00ecf