aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-20 17:51:32 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-20 17:51:32 +1000
commitb9b1b0e5662f8e3dbbfa9bb09dd4f69aac9c2db0 (patch)
tree2fbcff058e782577894037efdc65b89fc0b9f182 /sway/input
parentMerge pull request #2870 from RyanDwyer/refactor-input-manager (diff)
downloadsway-b9b1b0e5662f8e3dbbfa9bb09dd4f69aac9c2db0.tar.gz
sway-b9b1b0e5662f8e3dbbfa9bb09dd4f69aac9c2db0.tar.zst
sway-b9b1b0e5662f8e3dbbfa9bb09dd4f69aac9c2db0.zip
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.c22
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) {
756 } 756 }
757 } 757 }
758 758
759 // If we've focused a floating container, bring it to the front.
760 if (container && config->raise_floating) {
761 container_raise_floating(container);
762 }
763
764 if (new_output_last_ws) { 759 if (new_output_last_ws) {
765 workspace_consider_destroy(new_output_last_ws); 760 workspace_consider_destroy(new_output_last_ws);
766 } 761 }
@@ -1010,10 +1005,7 @@ void seat_begin_down(struct sway_seat *seat, struct sway_container *con,
1010 seat->op_ref_con_ly = sy; 1005 seat->op_ref_con_ly = sy;
1011 seat->op_moved = false; 1006 seat->op_moved = false;
1012 1007
1013 // In case the container was not raised by gaining focus, raise on click 1008 container_raise_floating(con);
1014 if (!config->raise_floating) {
1015 container_raise_floating(con);
1016 }
1017} 1009}
1018 1010
1019void seat_begin_move_floating(struct sway_seat *seat, 1011void seat_begin_move_floating(struct sway_seat *seat,
@@ -1026,10 +1018,7 @@ void seat_begin_move_floating(struct sway_seat *seat,
1026 seat->op_container = con; 1018 seat->op_container = con;
1027 seat->op_button = button; 1019 seat->op_button = button;
1028 1020
1029 // In case the container was not raised by gaining focus, raise on click 1021 container_raise_floating(con);
1030 if (!config->raise_floating) {
1031 container_raise_floating(con);
1032 }
1033 1022
1034 cursor_set_image(seat->cursor, "grab", NULL); 1023 cursor_set_image(seat->cursor, "grab", NULL);
1035} 1024}
@@ -1064,11 +1053,8 @@ void seat_begin_resize_floating(struct sway_seat *seat,
1064 seat->op_ref_con_ly = con->y; 1053 seat->op_ref_con_ly = con->y;
1065 seat->op_ref_width = con->width; 1054 seat->op_ref_width = con->width;
1066 seat->op_ref_height = con->height; 1055 seat->op_ref_height = con->height;
1067 // 1056
1068 // In case the container was not raised by gaining focus, raise on click 1057 container_raise_floating(con);
1069 if (!config->raise_floating) {
1070 container_raise_floating(con);
1071 }
1072 1058
1073 const char *image = edge == WLR_EDGE_NONE ? 1059 const char *image = edge == WLR_EDGE_NONE ?
1074 "se-resize" : wlr_xcursor_get_resize_name(edge); 1060 "se-resize" : wlr_xcursor_get_resize_name(edge);