diff options
Diffstat (limited to 'include/sway/tree')
| -rw-r--r-- | include/sway/tree/container.h | 21 | ||||
| -rw-r--r-- | include/sway/tree/root.h | 2 | ||||
| -rw-r--r-- | include/sway/tree/view.h | 16 | ||||
| -rw-r--r-- | include/sway/tree/workspace.h | 4 | 
4 files changed, 23 insertions, 20 deletions
| diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 4366a010..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; @@ -104,7 +106,12 @@ struct sway_container {  	bool border_right;  	// The gaps currently applied to the container. -	double current_gaps; +	struct { +		int top; +		int right; +		int bottom; +		int left; +	} current_gaps;  	struct sway_workspace *workspace; // NULL when hidden in the scratchpad  	struct sway_container *parent;    // NULL if container in root of workspace @@ -205,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/root.h b/include/sway/tree/root.h index a2d464f9..ceccc920 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h @@ -16,7 +16,7 @@ struct sway_root {  	struct wlr_output_layout *output_layout;  	struct wl_listener output_layout_change; -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  	struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link  #endif  	struct wl_list drag_icons; // sway_drag_icon::link diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 4a8c3cb1..4716c688 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h @@ -4,7 +4,7 @@  #include <wlr/types/wlr_surface.h>  #include <wlr/types/wlr_xdg_shell_v6.h>  #include "config.h" -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  #include <wlr/xwayland.h>  #endif  #include "sway/input/input-manager.h" @@ -16,7 +16,7 @@ struct sway_xdg_decoration;  enum sway_view_type {  	SWAY_VIEW_XDG_SHELL_V6,  	SWAY_VIEW_XDG_SHELL, -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  	SWAY_VIEW_XWAYLAND,  #endif  }; @@ -28,7 +28,7 @@ enum sway_view_prop {  	VIEW_PROP_INSTANCE,  	VIEW_PROP_WINDOW_TYPE,  	VIEW_PROP_WINDOW_ROLE, -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  	VIEW_PROP_X11_WINDOW_ID,  	VIEW_PROP_X11_PARENT_ID,  #endif @@ -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; @@ -104,7 +100,7 @@ struct sway_view {  	union {  		struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;  		struct wlr_xdg_surface *wlr_xdg_surface; -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  		struct wlr_xwayland_surface *wlr_xwayland_surface;  #endif  		struct wlr_wl_shell_surface *wlr_wl_shell_surface; @@ -148,7 +144,7 @@ struct sway_xdg_shell_view {  	struct wl_listener unmap;  	struct wl_listener destroy;  }; -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  struct sway_xwayland_view {  	struct sway_view view; @@ -327,7 +323,7 @@ struct sway_view *view_from_wlr_xdg_surface(  	struct wlr_xdg_surface *xdg_surface);  struct sway_view *view_from_wlr_xdg_surface_v6(  	struct wlr_xdg_surface_v6 *xdg_surface_v6); -#ifdef HAVE_XWAYLAND +#if HAVE_XWAYLAND  struct sway_view *view_from_wlr_xwayland_surface(  	struct wlr_xwayland_surface *xsurface);  #endif diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index b5ae92f3..7abfbff1 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h @@ -32,9 +32,9 @@ struct sway_workspace {  	enum sway_container_layout layout;  	enum sway_container_layout prev_split_layout; -	int current_gaps; +	struct side_gaps current_gaps;  	int gaps_inner; -	int gaps_outer; +	struct side_gaps gaps_outer;  	struct sway_output *output; // NULL if no outputs are connected  	list_t *floating;           // struct sway_container | 
