aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorThomas Hebb <tommyhebb@gmail.com>2022-02-21 23:07:09 -0800
committerSimon Ser <contact@emersion.fr>2022-02-24 12:12:12 +0100
commit0ee54a524329ab8d3db7dbe8286dc97b0bf57bed (patch)
treeacab9a691395d9e8dd5cb965e38c0b7bbd522c62 /sway/desktop/xdg_shell.c
parentb38b845c6311a0d2b2daed7d35d90a6a7eb7bcf1 (diff)
Don't enter seatop_move_floating when fullscreen
Currently, a floating window that's been fullscreened can send us xdg_toplevel::move, and we'll enter seatop_move_floating, which lets us drag the surface around while it's fullscreen. We don't want this--fullscreen surfaces should always be aligned to the screen--so add the same check that seatop_default already does when entering this mode. Tested with Weston's weston-fullscreen demo, which sends a move request if you click anywhere on its surface.
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 6af67207..51168f4c 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -360,7 +360,8 @@ static void handle_request_move(struct wl_listener *listener, void *data) {
struct sway_xdg_shell_view *xdg_shell_view =
wl_container_of(listener, xdg_shell_view, request_move);
struct sway_view *view = &xdg_shell_view->view;
- if (!container_is_floating(view->container)) {
+ if (!container_is_floating(view->container) ||
+ view->container->pending.fullscreen_mode) {
return;
}
struct wlr_xdg_toplevel_move_event *e = data;