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_v6.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_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 57b51908..201b5b1e 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -259,6 +259,9 @@ static void handle_request_move(struct wl_listener *listener, void *data) { | |||
259 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = | 259 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = |
260 | wl_container_of(listener, xdg_shell_v6_view, request_move); | 260 | wl_container_of(listener, xdg_shell_v6_view, request_move); |
261 | struct sway_view *view = &xdg_shell_v6_view->view; | 261 | struct sway_view *view = &xdg_shell_v6_view->view; |
262 | if (!container_is_floating(view->swayc)) { | ||
263 | return; | ||
264 | } | ||
262 | struct wlr_xdg_toplevel_v6_move_event *e = data; | 265 | struct wlr_xdg_toplevel_v6_move_event *e = data; |
263 | struct sway_seat *seat = e->seat->seat->data; | 266 | struct sway_seat *seat = e->seat->seat->data; |
264 | if (e->serial == seat->last_button_serial) { | 267 | if (e->serial == seat->last_button_serial) { |
@@ -270,6 +273,9 @@ static void handle_request_resize(struct wl_listener *listener, void *data) { | |||
270 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = | 273 | struct sway_xdg_shell_v6_view *xdg_shell_v6_view = |
271 | wl_container_of(listener, xdg_shell_v6_view, request_resize); | 274 | wl_container_of(listener, xdg_shell_v6_view, request_resize); |
272 | struct sway_view *view = &xdg_shell_v6_view->view; | 275 | struct sway_view *view = &xdg_shell_v6_view->view; |
276 | if (!container_is_floating(view->swayc)) { | ||
277 | return; | ||
278 | } | ||
273 | struct wlr_xdg_toplevel_v6_resize_event *e = data; | 279 | struct wlr_xdg_toplevel_v6_resize_event *e = data; |
274 | struct sway_seat *seat = e->seat->seat->data; | 280 | struct sway_seat *seat = e->seat->seat->data; |
275 | if (e->serial == seat->last_button_serial) { | 281 | if (e->serial == seat->last_button_serial) { |