aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2020-07-06 23:57:48 -0700
committerBrian Ashworth <bosrsf04@gmail.com>2020-07-13 00:21:52 -0400
commit39d677af15bd4c8cdea6b62fda80ac9a9e998045 (patch)
tree0612524effa083389ecce17d0f0dafad8f25d6ec /sway/desktop/xdg_shell.c
parent10ec97c073ea7c06f7c129a4baa4576783248148 (diff)
input: implement xdg_toplevel interactive resize hints
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index df751ef6..3437cc07 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -185,6 +185,14 @@ static void set_fullscreen(struct sway_view *view, bool fullscreen) {
wlr_xdg_toplevel_set_fullscreen(surface, fullscreen);
}
+static void set_resizing(struct sway_view *view, bool resizing) {
+ if (xdg_shell_view_from_view(view) == NULL) {
+ return;
+ }
+ struct wlr_xdg_surface *surface = view->wlr_xdg_surface;
+ wlr_xdg_toplevel_set_resizing(surface, resizing);
+}
+
static bool wants_floating(struct sway_view *view) {
struct wlr_xdg_toplevel *toplevel = view->wlr_xdg_surface->toplevel;
struct wlr_xdg_toplevel_state *state = &toplevel->current;
@@ -260,6 +268,7 @@ static const struct sway_view_impl view_impl = {
.set_activated = set_activated,
.set_tiled = set_tiled,
.set_fullscreen = set_fullscreen,
+ .set_resizing = set_resizing,
.wants_floating = wants_floating,
.for_each_surface = for_each_surface,
.for_each_popup = for_each_popup,