diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-20 15:30:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-20 15:30:54 +0200 |
commit | 551e05ba90feb497723bbc214781ba58b60562a7 (patch) | |
tree | ab05e09c7ff6cef1475f230f37372b04c54c0ae0 /sway | |
parent | c75098e96fabad5539e0114346dba7e24cee6ffe (diff) | |
parent | b9b1b0e5662f8e3dbbfa9bb09dd4f69aac9c2db0 (diff) |
Merge pull request #2888 from RyanDwyer/remove-raise-floating
Remove raise_floating directive
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 1 | ||||
-rw-r--r-- | sway/commands/raise_floating.c | 14 | ||||
-rw-r--r-- | sway/config.c | 1 | ||||
-rw-r--r-- | sway/input/seat.c | 22 | ||||
-rw-r--r-- | sway/meson.build | 1 | ||||
-rw-r--r-- | sway/sway.5.scd | 5 |
6 files changed, 4 insertions, 40 deletions
diff --git a/sway/commands.c b/sway/commands.c index d1275a1e..3f416afc 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -110,7 +110,6 @@ static struct cmd_handler handlers[] = { { "no_focus", cmd_no_focus }, { "output", cmd_output }, { "popup_during_fullscreen", cmd_popup_during_fullscreen }, - { "raise_floating", cmd_raise_floating }, { "seat", cmd_seat }, { "set", cmd_set }, { "show_marks", cmd_show_marks }, diff --git a/sway/commands/raise_floating.c b/sway/commands/raise_floating.c deleted file mode 100644 index 930299a1..00000000 --- a/sway/commands/raise_floating.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <string.h> -#include <strings.h> -#include "sway/commands.h" -#include "util.h" - -struct cmd_results *cmd_raise_floating(int argc, char **argv) { - struct cmd_results *error = NULL; - if ((error = checkarg(argc, "raise_floating", EXPECTED_EQUAL_TO, 1))) { - return error; - } - config->raise_floating = - parse_boolean(argv[0], config->raise_floating); - return cmd_results_new(CMD_SUCCESS, NULL, NULL); -} diff --git a/sway/config.c b/sway/config.c index f683e7ab..b9cb0a1c 100644 --- a/sway/config.c +++ b/sway/config.c @@ -221,7 +221,6 @@ static void config_defaults(struct sway_config *config) { // Flags config->focus_follows_mouse = true; - config->raise_floating = true; config->mouse_warping = WARP_OUTPUT; config->focus_wrapping = WRAP_YES; config->validating = false; 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); diff --git a/sway/meson.build b/sway/meson.build index c7fc9697..cde09a02 100644 --- a/sway/meson.build +++ b/sway/meson.build @@ -48,7 +48,6 @@ sway_sources = files( 'commands/floating_modifier.c', 'commands/focus.c', 'commands/focus_follows_mouse.c', - 'commands/raise_floating.c', 'commands/focus_on_window_activation.c', 'commands/focus_wrapping.c', 'commands/font.c', diff --git a/sway/sway.5.scd b/sway/sway.5.scd index e5e7918f..51fd260b 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd @@ -446,11 +446,6 @@ The default colors are: devices. A list of input device names may be obtained via *swaymsg -t get\_inputs*. -*raise\_floating* yes|no - Controls the behaviour of floating windows. A _yes_ (the default) will - raise windows on gaining focus. A _no_ will only raise floating windows - by clicking anywhere in the window. - *seat* <seat> <seat-subcommands...> For details on seat subcommands, see *sway-input*(5). |