aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-27 18:06:50 -0500
committerGitHub <noreply@github.com>2019-01-27 18:06:50 -0500
commit783fadab284c79c8e13625e5e2a2eefae02c75d3 (patch)
tree795c5c69a7fcfc9336115ac157a41b943190f206 /sway/input
parent897250c65fb4d7123361dc6f77c2824179ed8885 (diff)
parent20aa8ee67dc528299dbc8735220a1c081c7ff9f6 (diff)
downloadsway-783fadab284c79c8e13625e5e2a2eefae02c75d3.tar.xz
Merge pull request #3423 from RyanDwyer/fullscreen-global
Implement fullscreen global
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c12
-rw-r--r--sway/input/seat.c12
2 files changed, 23 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index af2799ce..c84d6c40 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -90,6 +90,16 @@ struct sway_node *node_at_coords(
double ox = lx, oy = ly;
wlr_output_layout_output_coords(root->output_layout, wlr_output, &ox, &oy);
+ if (root->fullscreen_global) {
+ // Try fullscreen container
+ struct sway_container *con = tiling_container_at(
+ &root->fullscreen_global->node, lx, ly, surface, sx, sy);
+ if (con) {
+ return &con->node;
+ }
+ return NULL;
+ }
+
// find the focused workspace on the output for this seat
struct sway_workspace *ws = output_get_active_workspace(output);
@@ -659,7 +669,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
// Handle moving a tiling container
if (config->tiling_drag && (mod_pressed || on_titlebar) &&
state == WLR_BUTTON_PRESSED && !is_floating_or_child &&
- cont && !cont->is_fullscreen) {
+ cont && cont->fullscreen_mode == FULLSCREEN_NONE) {
struct sway_container *focus = seat_get_focused_container(seat);
bool focused = focus == cont || container_has_ancestor(focus, cont);
if (on_titlebar && !focused) {
diff --git a/sway/input/seat.c b/sway/input/seat.c
index b6ccd830..8cb1d8e9 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -752,6 +752,18 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
return;
}
}
+ // Deny setting focus to a workspace node when using fullscreen global
+ if (root->fullscreen_global && !container && new_workspace) {
+ return;
+ }
+ // Deny setting focus to a view which is hidden by a fullscreen global
+ if (root->fullscreen_global && container != root->fullscreen_global &&
+ !container_has_ancestor(container, root->fullscreen_global)) {
+ // Unless it's a transient container
+ if (!container_is_transient_for(container, root->fullscreen_global)) {
+ return;
+ }
+ }
struct sway_output *new_output = new_workspace->output;