diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-22 21:45:01 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-22 23:10:19 +1000 |
commit | cf5f5eaf8c67c9d06c491a82b0b235aa27bbfe5c (patch) | |
tree | 854aa150b1c8de3f004d80b3215d95a8b508192e /sway/desktop/xdg_shell.c | |
parent | Consider view's min/max sizes when resizing (diff) | |
download | sway-cf5f5eaf8c67c9d06c491a82b0b235aa27bbfe5c.tar.gz sway-cf5f5eaf8c67c9d06c491a82b0b235aa27bbfe5c.tar.zst sway-cf5f5eaf8c67c9d06c491a82b0b235aa27bbfe5c.zip |
Deny move/resize events for tiled xdg shell views
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 76fe72ea..706b35c3 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -264,6 +264,9 @@ static void handle_request_move(struct wl_listener *listener, void *data) { | |||
264 | struct sway_xdg_shell_view *xdg_shell_view = | 264 | struct sway_xdg_shell_view *xdg_shell_view = |
265 | wl_container_of(listener, xdg_shell_view, request_move); | 265 | wl_container_of(listener, xdg_shell_view, request_move); |
266 | struct sway_view *view = &xdg_shell_view->view; | 266 | struct sway_view *view = &xdg_shell_view->view; |
267 | if (!container_is_floating(view->swayc)) { | ||
268 | return; | ||
269 | } | ||
267 | struct wlr_xdg_toplevel_move_event *e = data; | 270 | struct wlr_xdg_toplevel_move_event *e = data; |
268 | struct sway_seat *seat = e->seat->seat->data; | 271 | struct sway_seat *seat = e->seat->seat->data; |
269 | if (e->serial == seat->last_button_serial) { | 272 | if (e->serial == seat->last_button_serial) { |
@@ -275,6 +278,9 @@ static void handle_request_resize(struct wl_listener *listener, void *data) { | |||
275 | struct sway_xdg_shell_view *xdg_shell_view = | 278 | struct sway_xdg_shell_view *xdg_shell_view = |
276 | wl_container_of(listener, xdg_shell_view, request_resize); | 279 | wl_container_of(listener, xdg_shell_view, request_resize); |
277 | struct sway_view *view = &xdg_shell_view->view; | 280 | struct sway_view *view = &xdg_shell_view->view; |
281 | if (!container_is_floating(view->swayc)) { | ||
282 | return; | ||
283 | } | ||
278 | struct wlr_xdg_toplevel_resize_event *e = data; | 284 | struct wlr_xdg_toplevel_resize_event *e = data; |
279 | struct sway_seat *seat = e->seat->seat->data; | 285 | struct sway_seat *seat = e->seat->seat->data; |
280 | if (e->serial == seat->last_button_serial) { | 286 | if (e->serial == seat->last_button_serial) { |