aboutsummaryrefslogtreecommitdiff
path: root/sway/resize.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/resize.c')
-rw-r--r--sway/resize.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/resize.c b/sway/resize.c
index f1b1f4ae..9411cfd8 100644
--- a/sway/resize.c
+++ b/sway/resize.c
@@ -5,6 +5,20 @@
#include "log.h"
#include "input_state.h"
#include "handlers.h"
+#include "resize.h"
+
+bool set_size_tiled(int amount, bool use_width) {
+ int desired;
+ swayc_t *focused = get_focused_view(swayc_active_workspace());
+
+ if (use_width) {
+ desired = amount - focused->width;
+ } else {
+ desired = amount - focused->height;
+ }
+
+ return resize_tiled(desired, use_width);
+}
bool resize_tiled(int amount, bool use_width) {
swayc_t *parent = get_focused_view(swayc_active_workspace());