summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 14:15:40 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 14:15:40 -0400
commit357a4401fa117416f3182a5f91d27b52b114f3ee (patch)
tree8ffb68c96ac327aa2b37ec40bbf982022e934365
parentMerge branch 'wlroots' into split-containers (diff)
downloadsway-357a4401fa117416f3182a5f91d27b52b114f3ee.tar.gz
sway-357a4401fa117416f3182a5f91d27b52b114f3ee.tar.zst
sway-357a4401fa117416f3182a5f91d27b52b114f3ee.zip
address feedback
-rw-r--r--sway/commands/split.c1
-rw-r--r--sway/input/seat.c1
-rw-r--r--sway/tree/container.c2
-rw-r--r--sway/tree/layout.c5
4 files changed, 4 insertions, 5 deletions
diff --git a/sway/commands/split.c b/sway/commands/split.c
index 6df20e88..fe4013e9 100644
--- a/sway/commands/split.c
+++ b/sway/commands/split.c
@@ -76,6 +76,7 @@ struct cmd_results *cmd_split(int argc, char **argv) {
76 strcasecmp(argv[0], "toggle") == 0) { 76 strcasecmp(argv[0], "toggle") == 0) {
77 struct sway_container *focused = 77 struct sway_container *focused =
78 config->handler_context.current_container; 78 config->handler_context.current_container;
79
79 if (focused->parent->layout == L_VERT) { 80 if (focused->parent->layout == L_VERT) {
80 _do_split(argc - 1, argv + 1, L_HORIZ); 81 _do_split(argc - 1, argv + 1, L_HORIZ);
81 } else { 82 } else {
diff --git a/sway/input/seat.c b/sway/input/seat.c
index a1b1caa8..1fd204d4 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -92,7 +92,6 @@ static void handle_seat_container_destroy(struct wl_listener *listener,
92 struct sway_container *parent = con->parent; 92 struct sway_container *parent = con->parent;
93 struct sway_container *focus = sway_seat_get_focus(seat); 93 struct sway_container *focus = sway_seat_get_focus(seat);
94 94
95 // TODO handle workspace switch in the seat?
96 bool set_focus = 95 bool set_focus =
97 focus != NULL && 96 focus != NULL &&
98 (focus == con || container_has_child(con, focus)) && 97 (focus == con || container_has_child(con, focus)) &&
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 41ba973f..9205d929 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -424,7 +424,7 @@ bool container_has_anscestor(struct sway_container *descendant,
424 return false; 424 return false;
425} 425}
426 426
427bool find_child_func(struct sway_container *con, void *data) { 427static bool find_child_func(struct sway_container *con, void *data) {
428 struct sway_container *child = data; 428 struct sway_container *child = data;
429 return con == child; 429 return con == child;
430} 430}
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 83e4fe37..e13c2ac4 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -101,8 +101,6 @@ void container_add_child(struct sway_container *parent,
101 parent, parent->type, parent->width, parent->height); 101 parent, parent->type, parent->width, parent->height);
102 list_add(parent->children, child); 102 list_add(parent->children, child);
103 child->parent = parent; 103 child->parent = parent;
104 // TODO: set focus for this container?
105 sway_input_manager_set_focus(input_manager, child);
106} 104}
107 105
108struct sway_container *container_reap_empty(struct sway_container *container) { 106struct sway_container *container_reap_empty(struct sway_container *container) {
@@ -632,7 +630,8 @@ struct sway_container *container_get_in_direction(
632 wrap_candidate = parent->children->items[0]; 630 wrap_candidate = parent->children->items[0];
633 } 631 }
634 if (config->force_focus_wrapping) { 632 if (config->force_focus_wrapping) {
635 return sway_seat_get_focus_by_type(seat, wrap_candidate, C_VIEW); 633 return sway_seat_get_focus_by_type(seat,
634 wrap_candidate, C_VIEW);
636 } 635 }
637 } 636 }
638 } else { 637 } else {