Deny move/resize events for tiled xdg shell views

master
Ryan Dwyer 7 years ago
parent 011d1ebfa4
commit cf5f5eaf8c

@ -264,6 +264,9 @@ static void handle_request_move(struct wl_listener *listener, void *data) {
struct sway_xdg_shell_view *xdg_shell_view = struct sway_xdg_shell_view *xdg_shell_view =
wl_container_of(listener, xdg_shell_view, request_move); wl_container_of(listener, xdg_shell_view, request_move);
struct sway_view *view = &xdg_shell_view->view; struct sway_view *view = &xdg_shell_view->view;
if (!container_is_floating(view->swayc)) {
return;
}
struct wlr_xdg_toplevel_move_event *e = data; struct wlr_xdg_toplevel_move_event *e = data;
struct sway_seat *seat = e->seat->seat->data; struct sway_seat *seat = e->seat->seat->data;
if (e->serial == seat->last_button_serial) { if (e->serial == seat->last_button_serial) {
@ -275,6 +278,9 @@ static void handle_request_resize(struct wl_listener *listener, void *data) {
struct sway_xdg_shell_view *xdg_shell_view = struct sway_xdg_shell_view *xdg_shell_view =
wl_container_of(listener, xdg_shell_view, request_resize); wl_container_of(listener, xdg_shell_view, request_resize);
struct sway_view *view = &xdg_shell_view->view; struct sway_view *view = &xdg_shell_view->view;
if (!container_is_floating(view->swayc)) {
return;
}
struct wlr_xdg_toplevel_resize_event *e = data; struct wlr_xdg_toplevel_resize_event *e = data;
struct sway_seat *seat = e->seat->seat->data; struct sway_seat *seat = e->seat->seat->data;
if (e->serial == seat->last_button_serial) { if (e->serial == seat->last_button_serial) {

@ -259,6 +259,9 @@ static void handle_request_move(struct wl_listener *listener, void *data) {
struct sway_xdg_shell_v6_view *xdg_shell_v6_view = struct sway_xdg_shell_v6_view *xdg_shell_v6_view =
wl_container_of(listener, xdg_shell_v6_view, request_move); wl_container_of(listener, xdg_shell_v6_view, request_move);
struct sway_view *view = &xdg_shell_v6_view->view; struct sway_view *view = &xdg_shell_v6_view->view;
if (!container_is_floating(view->swayc)) {
return;
}
struct wlr_xdg_toplevel_v6_move_event *e = data; struct wlr_xdg_toplevel_v6_move_event *e = data;
struct sway_seat *seat = e->seat->seat->data; struct sway_seat *seat = e->seat->seat->data;
if (e->serial == seat->last_button_serial) { if (e->serial == seat->last_button_serial) {
@ -270,6 +273,9 @@ static void handle_request_resize(struct wl_listener *listener, void *data) {
struct sway_xdg_shell_v6_view *xdg_shell_v6_view = struct sway_xdg_shell_v6_view *xdg_shell_v6_view =
wl_container_of(listener, xdg_shell_v6_view, request_resize); wl_container_of(listener, xdg_shell_v6_view, request_resize);
struct sway_view *view = &xdg_shell_v6_view->view; struct sway_view *view = &xdg_shell_v6_view->view;
if (!container_is_floating(view->swayc)) {
return;
}
struct wlr_xdg_toplevel_v6_resize_event *e = data; struct wlr_xdg_toplevel_v6_resize_event *e = data;
struct sway_seat *seat = e->seat->seat->data; struct sway_seat *seat = e->seat->seat->data;
if (e->serial == seat->last_button_serial) { if (e->serial == seat->last_button_serial) {

Loading…
Cancel
Save