diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-20 17:51:32 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-20 17:51:32 +1000 |
commit | b9b1b0e5662f8e3dbbfa9bb09dd4f69aac9c2db0 (patch) | |
tree | 2fbcff058e782577894037efdc65b89fc0b9f182 /sway/input | |
parent | 75ea19c71b08e4b3dd1ad053944724fd91dc04bd (diff) |
Remove raise_floating directive
The directive controlled whether floating views should raise to the top
when the cursor is moved over it while using focus_follows_mouse. The
default was enabled, which is undesirable. For example, if you have two
floating views where one completely covers the other, the smaller one
would be inaccessible because moving the mouse over the bigger one would
raise it above the smaller one.
There is no known use case for having raise_floating enabled, so this
patch removes the directive and implements the raise_floating disabled
behaviour instead.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seat.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 330b7bbe..2e352b19 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -756,11 +756,6 @@ void seat_set_focus(struct sway_seat *seat, struct sway_node *node) { } } - // If we've focused a floating container, bring it to the front. - if (container && config->raise_floating) { - container_raise_floating(container); - } - if (new_output_last_ws) { workspace_consider_destroy(new_output_last_ws); } @@ -1010,10 +1005,7 @@ void seat_begin_down(struct sway_seat *seat, struct sway_container *con, seat->op_ref_con_ly = sy; seat->op_moved = false; - // In case the container was not raised by gaining focus, raise on click - if (!config->raise_floating) { - container_raise_floating(con); - } + container_raise_floating(con); } void seat_begin_move_floating(struct sway_seat *seat, @@ -1026,10 +1018,7 @@ void seat_begin_move_floating(struct sway_seat *seat, seat->op_container = con; seat->op_button = button; - // In case the container was not raised by gaining focus, raise on click - if (!config->raise_floating) { - container_raise_floating(con); - } + container_raise_floating(con); cursor_set_image(seat->cursor, "grab", NULL); } @@ -1064,11 +1053,8 @@ void seat_begin_resize_floating(struct sway_seat *seat, seat->op_ref_con_ly = con->y; seat->op_ref_width = con->width; seat->op_ref_height = con->height; - // - // In case the container was not raised by gaining focus, raise on click - if (!config->raise_floating) { - container_raise_floating(con); - } + + container_raise_floating(con); const char *image = edge == WLR_EDGE_NONE ? "se-resize" : wlr_xcursor_get_resize_name(edge); |