diff options
author | Ronan Pigott <rpigott@berkeley.edu> | 2020-07-06 23:57:48 -0700 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2020-07-13 00:21:52 -0400 |
commit | 39d677af15bd4c8cdea6b62fda80ac9a9e998045 (patch) | |
tree | 0612524effa083389ecce17d0f0dafad8f25d6ec /sway/input/seatop_resize_floating.c | |
parent | rephrase swayidle-timout example to improve readability (diff) | |
download | sway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.tar.gz sway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.tar.zst sway-39d677af15bd4c8cdea6b62fda80ac9a9e998045.zip |
input: implement xdg_toplevel interactive resize hints
Diffstat (limited to 'sway/input/seatop_resize_floating.c')
-rw-r--r-- | sway/input/seatop_resize_floating.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/input/seatop_resize_floating.c b/sway/input/seatop_resize_floating.c index ec10cfc8..10af06fe 100644 --- a/sway/input/seatop_resize_floating.c +++ b/sway/input/seatop_resize_floating.c | |||
@@ -21,7 +21,12 @@ struct seatop_resize_floating_event { | |||
21 | static void handle_button(struct sway_seat *seat, uint32_t time_msec, | 21 | static void handle_button(struct sway_seat *seat, uint32_t time_msec, |
22 | struct wlr_input_device *device, uint32_t button, | 22 | struct wlr_input_device *device, uint32_t button, |
23 | enum wlr_button_state state) { | 23 | enum wlr_button_state state) { |
24 | struct seatop_resize_floating_event *e = seat->seatop_data; | ||
25 | struct sway_container *con = e->con; | ||
26 | |||
24 | if (seat->cursor->pressed_button_count == 0) { | 27 | if (seat->cursor->pressed_button_count == 0) { |
28 | container_set_resizing(con, false); | ||
29 | arrange_container(con); // Send configure w/o resizing hint | ||
25 | seatop_begin_default(seat); | 30 | seatop_begin_default(seat); |
26 | } | 31 | } |
27 | } | 32 | } |
@@ -170,6 +175,7 @@ void seatop_begin_resize_floating(struct sway_seat *seat, | |||
170 | seat->seatop_impl = &seatop_impl; | 175 | seat->seatop_impl = &seatop_impl; |
171 | seat->seatop_data = e; | 176 | seat->seatop_data = e; |
172 | 177 | ||
178 | container_set_resizing(con, true); | ||
173 | container_raise_floating(con); | 179 | container_raise_floating(con); |
174 | 180 | ||
175 | const char *image = edge == WLR_EDGE_NONE ? | 181 | const char *image = edge == WLR_EDGE_NONE ? |