diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-25 20:56:23 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-26 08:27:07 +1000 |
commit | 27a20a488465468511de9b2307941ac1bc4db8bf (patch) | |
tree | c5c1aff483cb089870ffebec00869347eec29f4c /sway/input | |
parent | c8dc9b3b3094c9b2778309855114b9495518c2d4 (diff) | |
download | sway-27a20a488465468511de9b2307941ac1bc4db8bf.tar.xz |
Allow containers to be fullscreen
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 14 | ||||
-rw-r--r-- | sway/input/seat.c | 3 |
2 files changed, 5 insertions, 12 deletions
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; } |