From c04819e8c080e40e1e872c8624c60c4a51087019 Mon Sep 17 00:00:00 2001 From: Frantisek Fladung Date: Thu, 12 Jan 2017 12:11:04 +0100 Subject: Implement hide_edge_borders smart (like in i3 4.13) --- include/sway/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/sway') diff --git a/include/sway/config.h b/include/sway/config.h index 4a14cd36..febde63d 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -178,7 +178,8 @@ enum edge_border_types { E_NONE, /**< Don't hide edge borders */ E_VERTICAL, /**< hide vertical edge borders */ E_HORIZONTAL, /**< hide horizontal edge borders */ - E_BOTH /**< hide vertical and horizontal edge borders */ + E_BOTH, /**< hide vertical and horizontal edge borders */ + E_SMART /**< hide both if precisely one window is present in workspace */ }; enum command_context { -- cgit v1.2.3 From eda4bad725b8a76accdb2a9c648efa046b88c0c0 Mon Sep 17 00:00:00 2001 From: Daniel Kessler Date: Fri, 13 Jan 2017 16:06:10 -0800 Subject: Add output wrapping This fixes issue #733. Now if the user focuses output right but is at the rightmost monitor, the focus will wrap the the leftmost monitor. This commit adds a new function, swayc_opposite_output, which selects the opposite output given a position and a direction. Now, when calling output_by_name, we first check if there is an adjacent output to switch to. If that fails, we call swayc_opposite_output to handle wrapping. --- include/sway/output.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sway') diff --git a/include/sway/output.h b/include/sway/output.h index e8afd5ed..e1bdd3f0 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -7,6 +7,7 @@ // Position is absolute coordinates on the edge where the adjacent output // should be searched for. swayc_t *output_by_name(const char* name, const struct wlc_point *abs_pos); +swayc_t *swayc_opposite_output(enum movement_direction dir, const struct wlc_point *abs_pos); swayc_t *swayc_adjacent_output(swayc_t *output, enum movement_direction dir, const struct wlc_point *abs_pos, bool pick_closest); // Place absolute coordinates for given container into given wlc_point. -- cgit v1.2.3