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/desktop | |
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/desktop')
-rw-r--r-- | sway/desktop/xdg_shell.c | 9 |
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) { | |||
185 | wlr_xdg_toplevel_set_fullscreen(surface, fullscreen); | 185 | wlr_xdg_toplevel_set_fullscreen(surface, fullscreen); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void set_resizing(struct sway_view *view, bool resizing) { | ||
189 | if (xdg_shell_view_from_view(view) == NULL) { | ||
190 | return; | ||
191 | } | ||
192 | struct wlr_xdg_surface *surface = view->wlr_xdg_surface; | ||
193 | wlr_xdg_toplevel_set_resizing(surface, resizing); | ||
194 | } | ||
195 | |||
188 | static bool wants_floating(struct sway_view *view) { | 196 | static bool wants_floating(struct sway_view *view) { |
189 | struct wlr_xdg_toplevel *toplevel = view->wlr_xdg_surface->toplevel; | 197 | struct wlr_xdg_toplevel *toplevel = view->wlr_xdg_surface->toplevel; |
190 | struct wlr_xdg_toplevel_state *state = &toplevel->current; | 198 | struct wlr_xdg_toplevel_state *state = &toplevel->current; |
@@ -260,6 +268,7 @@ static const struct sway_view_impl view_impl = { | |||
260 | .set_activated = set_activated, | 268 | .set_activated = set_activated, |
261 | .set_tiled = set_tiled, | 269 | .set_tiled = set_tiled, |
262 | .set_fullscreen = set_fullscreen, | 270 | .set_fullscreen = set_fullscreen, |
271 | .set_resizing = set_resizing, | ||
263 | .wants_floating = wants_floating, | 272 | .wants_floating = wants_floating, |
264 | .for_each_surface = for_each_surface, | 273 | .for_each_surface = for_each_surface, |
265 | .for_each_popup = for_each_popup, | 274 | .for_each_popup = for_each_popup, |