summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-10-20 15:30:54 +0200
committerLibravatar GitHub <noreply@github.com>2018-10-20 15:30:54 +0200
commit551e05ba90feb497723bbc214781ba58b60562a7 (patch)
treeab05e09c7ff6cef1475f230f37372b04c54c0ae0
parentMerge pull request #2887 from RyanDwyer/bar-overlay (diff)
parentRemove raise_floating directive (diff)
downloadsway-551e05ba90feb497723bbc214781ba58b60562a7.tar.gz
sway-551e05ba90feb497723bbc214781ba58b60562a7.tar.zst
sway-551e05ba90feb497723bbc214781ba58b60562a7.zip
Merge pull request #2888 from RyanDwyer/remove-raise-floating
Remove raise_floating directive
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h1
-rw-r--r--sway/commands.c1
-rw-r--r--sway/commands/raise_floating.c14
-rw-r--r--sway/config.c1
-rw-r--r--sway/input/seat.c22
-rw-r--r--sway/meson.build1
-rw-r--r--sway/sway.5.scd5
8 files changed, 4 insertions, 42 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index ab2da1a9..2f6d31b1 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -126,7 +126,6 @@ sway_cmd cmd_floating_modifier;
126sway_cmd cmd_floating_scroll; 126sway_cmd cmd_floating_scroll;
127sway_cmd cmd_focus; 127sway_cmd cmd_focus;
128sway_cmd cmd_focus_follows_mouse; 128sway_cmd cmd_focus_follows_mouse;
129sway_cmd cmd_raise_floating;
130sway_cmd cmd_focus_on_window_activation; 129sway_cmd cmd_focus_on_window_activation;
131sway_cmd cmd_focus_wrapping; 130sway_cmd cmd_focus_wrapping;
132sway_cmd cmd_font; 131sway_cmd cmd_font;
diff --git a/include/sway/config.h b/include/sway/config.h
index fef3a60a..852d5576 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -379,7 +379,6 @@ struct sway_config {
379 379
380 // Flags 380 // Flags
381 bool focus_follows_mouse; 381 bool focus_follows_mouse;
382 bool raise_floating;
383 enum mouse_warping_mode mouse_warping; 382 enum mouse_warping_mode mouse_warping;
384 enum focus_wrapping_mode focus_wrapping; 383 enum focus_wrapping_mode focus_wrapping;
385 bool active; 384 bool active;
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[] = {
110 { "no_focus", cmd_no_focus }, 110 { "no_focus", cmd_no_focus },
111 { "output", cmd_output }, 111 { "output", cmd_output },
112 { "popup_during_fullscreen", cmd_popup_during_fullscreen }, 112 { "popup_during_fullscreen", cmd_popup_during_fullscreen },
113 { "raise_floating", cmd_raise_floating },
114 { "seat", cmd_seat }, 113 { "seat", cmd_seat },
115 { "set", cmd_set }, 114 { "set", cmd_set },
116 { "show_marks", cmd_show_marks }, 115 { "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 @@
1#include <string.h>
2#include <strings.h>
3#include "sway/commands.h"
4#include "util.h"
5
6struct cmd_results *cmd_raise_floating(int argc, char **argv) {
7 struct cmd_results *error = NULL;
8 if ((error = checkarg(argc, "raise_floating", EXPECTED_EQUAL_TO, 1))) {
9 return error;
10 }
11 config->raise_floating =
12 parse_boolean(argv[0], config->raise_floating);
13 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
14}
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) {
221 221
222 // Flags 222 // Flags
223 config->focus_follows_mouse = true; 223 config->focus_follows_mouse = true;
224 config->raise_floating = true;
225 config->mouse_warping = WARP_OUTPUT; 224 config->mouse_warping = WARP_OUTPUT;
226 config->focus_wrapping = WRAP_YES; 225 config->focus_wrapping = WRAP_YES;
227 config->validating = false; 226 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) {
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);
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(
48 'commands/floating_modifier.c', 48 'commands/floating_modifier.c',
49 'commands/focus.c', 49 'commands/focus.c',
50 'commands/focus_follows_mouse.c', 50 'commands/focus_follows_mouse.c',
51 'commands/raise_floating.c',
52 'commands/focus_on_window_activation.c', 51 'commands/focus_on_window_activation.c',
53 'commands/focus_wrapping.c', 52 'commands/focus_wrapping.c',
54 'commands/font.c', 53 '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:
446 devices. A list of input device names may be obtained via *swaymsg -t 446 devices. A list of input device names may be obtained via *swaymsg -t
447 get\_inputs*. 447 get\_inputs*.
448 448
449*raise\_floating* yes|no
450 Controls the behaviour of floating windows. A _yes_ (the default) will
451 raise windows on gaining focus. A _no_ will only raise floating windows
452 by clicking anywhere in the window.
453
454*seat* <seat> <seat-subcommands...> 449*seat* <seat> <seat-subcommands...>
455 For details on seat subcommands, see *sway-input*(5). 450 For details on seat subcommands, see *sway-input*(5).
456 451