From 15d9f1edcb69fec18104fc5d40780cf1306731ef Mon Sep 17 00:00:00 2001 From: Luminarys Date: Thu, 20 Aug 2015 11:30:11 -0500 Subject: Added in basic resize command --- include/layout.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/layout.h b/include/layout.h index 75e72d2f..4dff81b7 100644 --- a/include/layout.h +++ b/include/layout.h @@ -29,4 +29,6 @@ swayc_t *get_focused_container(swayc_t *parent); swayc_t *get_swayc_for_handle(wlc_handle handle, swayc_t *parent); swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir); +void recursive_resize(swayc_t *container, double amount, enum movement_direction dir); + #endif -- cgit v1.2.3 From bc3babf566f1f8ad9db4d1f7b70a859f54ba6c48 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Thu, 20 Aug 2015 11:30:32 -0500 Subject: Added in basic resize command --- include/ipc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/ipc.h b/include/ipc.h index 0b6441f6..2d71c666 100644 --- a/include/ipc.h +++ b/include/ipc.h @@ -2,14 +2,14 @@ #define _SWAY_IPC_H enum ipc_command_type { - IPC_COMMAND = 0, + IPC_COMMAND = 0, IPC_GET_WORKSPACES = 1, - IPC_SUBSCRIBE = 2, - IPC_GET_OUTPUTS = 3, - IPC_GET_TREE = 4, - IPC_GET_MARKS = 5, + IPC_SUBSCRIBE = 2, + IPC_GET_OUTPUTS = 3, + IPC_GET_TREE = 4, + IPC_GET_MARKS = 5, IPC_GET_BAR_CONFIG = 6, - IPC_GET_VERSION = 7, + IPC_GET_VERSION = 7, }; void ipc_init(void); -- cgit v1.2.3 From f589731f2912660bab6fdffc14ddcdbac3edd41c Mon Sep 17 00:00:00 2001 From: Luminarys Date: Thu, 20 Aug 2015 21:37:59 -0500 Subject: Rewrite of resize command to make it more sane --- include/container.h | 4 ++-- include/layout.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/container.h b/include/container.h index bd92058d..d3026011 100644 --- a/include/container.h +++ b/include/container.h @@ -33,12 +33,12 @@ struct sway_container { enum swayc_layouts layout; // Not including borders or margins - int width, height; + double width, height; // Used for setting floating geometry int desired_width, desired_height; - int x, y; + double x, y; bool visible; bool is_floating; diff --git a/include/layout.h b/include/layout.h index 4dff81b7..566e3246 100644 --- a/include/layout.h +++ b/include/layout.h @@ -29,6 +29,6 @@ swayc_t *get_focused_container(swayc_t *parent); swayc_t *get_swayc_for_handle(wlc_handle handle, swayc_t *parent); swayc_t *get_swayc_in_direction(swayc_t *container, enum movement_direction dir); -void recursive_resize(swayc_t *container, double amount, enum movement_direction dir); +void recursive_resize(swayc_t *container, double amount, enum wlc_resize_edge edge); #endif -- cgit v1.2.3 From 461da7f87fa970ce4ba1a124e6197554c85d42e5 Mon Sep 17 00:00:00 2001 From: Luminarys Date: Fri, 21 Aug 2015 00:17:26 -0500 Subject: Added in bspwm like mouse resizing --- include/input_state.h | 3 +++ include/layout.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/input_state.h b/include/input_state.h index 782b4b19..711ad633 100644 --- a/include/input_state.h +++ b/include/input_state.h @@ -34,6 +34,9 @@ extern struct pointer_state { bool drag; bool resize; } floating; + struct pointer_tiling { + bool resize; + } tiling; struct pointer_lock { bool left; bool right; diff --git a/include/layout.h b/include/layout.h index 566e3246..20044b95 100644 --- a/include/layout.h +++ b/include/layout.h @@ -18,7 +18,7 @@ swayc_t *replace_child(swayc_t *child, swayc_t *new_child); swayc_t *remove_child(swayc_t *child); // Layout -void arrange_windows(swayc_t *container, int width, int height); +void arrange_windows(swayc_t *container, double width, double height); // Focus void unfocus_all(swayc_t *container); -- cgit v1.2.3 From 96ab21b2766096bdb42d79a0169d42b9ff00e2fb Mon Sep 17 00:00:00 2001 From: Luminarys Date: Fri, 21 Aug 2015 00:49:47 -0500 Subject: Fixes to resizing and added in resize lock once boundaries are exceeded --- include/input_state.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/input_state.h b/include/input_state.h index 711ad633..7119c68b 100644 --- a/include/input_state.h +++ b/include/input_state.h @@ -36,6 +36,7 @@ extern struct pointer_state { } floating; struct pointer_tiling { bool resize; + swayc_t *init_view; } tiling; struct pointer_lock { bool left; -- cgit v1.2.3