diff options
author | 2018-07-22 21:45:01 +1000 | |
---|---|---|
committer | 2018-07-22 23:10:19 +1000 | |
commit | cf5f5eaf8c67c9d06c491a82b0b235aa27bbfe5c (patch) | |
tree | 854aa150b1c8de3f004d80b3215d95a8b508192e | |
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
-rw-r--r-- | sway/desktop/xdg_shell.c | 6 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 6 |
2 files changed, 12 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) { |
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) { |