From 27a20a488465468511de9b2307941ac1bc4db8bf Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 25 Jul 2018 20:56:23 +1000 Subject: Allow containers to be fullscreen --- sway/input/cursor.c | 14 ++++---------- sway/input/seat.c | 3 +-- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'sway/input') diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 02bd2239..cc0dbe99 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -99,14 +99,8 @@ static struct sway_container *container_at_coords( return ws; } if (ws->sway_workspace->fullscreen) { - struct wlr_surface *wlr_surface = ws->sway_workspace->fullscreen->surface; - if (wlr_surface_point_accepts_input(wlr_surface, ox, oy)) { - *sx = ox; - *sy = oy; - *surface = wlr_surface; - return ws->sway_workspace->fullscreen->swayc; - } - return NULL; + return container_at(ws->sway_workspace->fullscreen, lx, ly, + surface, sx, sy); } if ((*surface = layer_surface_at(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], @@ -438,8 +432,8 @@ static void dispatch_cursor_button_floating(struct sway_cursor *cursor, struct sway_container *cont) { struct sway_seat *seat = cursor->seat; - // Deny moving or resizing a fullscreen view - if (cont->type == C_VIEW && cont->sway_view->is_fullscreen) { + // Deny moving or resizing a fullscreen container + if (container_is_fullscreen_or_child(cont)) { seat_pointer_notify_button(seat, time_msec, button, state); return; } diff --git a/sway/input/seat.c b/sway/input/seat.c index 8698d69e..e7b6e0c5 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -632,8 +632,7 @@ void seat_set_focus_warp(struct sway_seat *seat, if (last_workspace && last_workspace == new_workspace && last_workspace->sway_workspace->fullscreen - && container && container->type == C_VIEW - && !container->sway_view->is_fullscreen) { + && container && !container_is_fullscreen_or_child(container)) { return; } -- cgit v1.2.3