From 9fd28aea8cc78fc19bbde3ca9c25e3e7a5465f96 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 19 May 2018 23:33:36 +1000 Subject: Rebuild textures if needed when moving a container When moving a container to an output which has a different scale than the previous, rebuild the title and marks textures at the new scale. Fixes #1999. --- include/sway/tree/container.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sway/tree/container.h') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index ec9e2385..e7e9d944 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -98,6 +98,8 @@ struct sway_container { // Passed the previous parent struct wl_signal reparent; } events; + + struct wl_listener reparent; }; struct sway_container *container_create(enum sway_container_type type); -- cgit v1.2.3 From c08f9bf257c38c92a75988d89fba2d4de6bb2aea Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 19 May 2018 22:54:50 +1000 Subject: Implement tabbed layout --- include/sway/tree/container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sway/tree/container.h') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index e7e9d944..598a4f3d 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -162,7 +162,7 @@ struct sway_container *container_parent(struct sway_container *container, * is a view and the view contains a surface at those coordinates. */ struct sway_container *container_at(struct sway_container *container, - double lx, double ly, struct wlr_surface **surface, + double ox, double oy, struct wlr_surface **surface, double *sx, double *sy); /** -- cgit v1.2.3 From f6c3682c05bce05f00b13b8f469b52923ecd8ddb Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 22 May 2018 08:27:42 +1000 Subject: Use constants for titlebar dimensions --- include/sway/tree/container.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/sway/tree/container.h') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 598a4f3d..64e8634a 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -11,6 +11,12 @@ extern struct sway_container root_container; struct sway_view; struct sway_seat; +#define TITLEBAR_BORDER_THICKNESS 1 + +// Padding includes titlebar border +#define TITLEBAR_H_PADDING 3 +#define TITLEBAR_V_PADDING 4 + /** * Different kinds of containers. * @@ -212,4 +218,9 @@ void container_calculate_title_height(struct sway_container *container); void container_notify_child_title_changed(struct sway_container *container); +/** + * Return the height of a regular title bar. + */ +size_t container_titlebar_height(); + #endif -- cgit v1.2.3 From 4de137e02161ef8188775d50fe5dc8d9e9bb2216 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 22 May 2018 09:44:34 +1000 Subject: Replace empty argument with void --- include/sway/tree/container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sway/tree/container.h') diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 64e8634a..493c70e2 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h @@ -221,6 +221,6 @@ void container_notify_child_title_changed(struct sway_container *container); /** * Return the height of a regular title bar. */ -size_t container_titlebar_height(); +size_t container_titlebar_height(void); #endif -- cgit v1.2.3