diff options
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r-- | sway/commands/move.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c index d4b55922..b22bb056 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <wlr/types/wlr_cursor.h> | 6 | #include <wlr/types/wlr_cursor.h> |
7 | #include <wlr/types/wlr_output.h> | 7 | #include <wlr/types/wlr_output.h> |
8 | #include <wlr/types/wlr_output_layout.h> | 8 | #include <wlr/types/wlr_output_layout.h> |
9 | #include <wlr/util/log.h> | ||
10 | #include "sway/commands.h" | 9 | #include "sway/commands.h" |
11 | #include "sway/input/cursor.h" | 10 | #include "sway/input/cursor.h" |
12 | #include "sway/input/seat.h" | 11 | #include "sway/input/seat.h" |
@@ -106,13 +105,13 @@ static void container_move_to_container_from_direction( | |||
106 | if (destination->view) { | 105 | if (destination->view) { |
107 | if (destination->parent == container->parent && | 106 | if (destination->parent == container->parent && |
108 | destination->workspace == container->workspace) { | 107 | destination->workspace == container->workspace) { |
109 | wlr_log(WLR_DEBUG, "Swapping siblings"); | 108 | sway_log(SWAY_DEBUG, "Swapping siblings"); |
110 | list_t *siblings = container_get_siblings(container); | 109 | list_t *siblings = container_get_siblings(container); |
111 | int container_index = list_find(siblings, container); | 110 | int container_index = list_find(siblings, container); |
112 | int destination_index = list_find(siblings, destination); | 111 | int destination_index = list_find(siblings, destination); |
113 | list_swap(siblings, container_index, destination_index); | 112 | list_swap(siblings, container_index, destination_index); |
114 | } else { | 113 | } else { |
115 | wlr_log(WLR_DEBUG, "Promoting to sibling of cousin"); | 114 | sway_log(SWAY_DEBUG, "Promoting to sibling of cousin"); |
116 | int offset = | 115 | int offset = |
117 | move_dir == WLR_DIRECTION_LEFT || move_dir == WLR_DIRECTION_UP; | 116 | move_dir == WLR_DIRECTION_LEFT || move_dir == WLR_DIRECTION_UP; |
118 | int index = container_sibling_index(destination) + offset; | 117 | int index = container_sibling_index(destination) + offset; |
@@ -128,7 +127,7 @@ static void container_move_to_container_from_direction( | |||
128 | } | 127 | } |
129 | 128 | ||
130 | if (is_parallel(destination->layout, move_dir)) { | 129 | if (is_parallel(destination->layout, move_dir)) { |
131 | wlr_log(WLR_DEBUG, "Reparenting container (parallel)"); | 130 | sway_log(SWAY_DEBUG, "Reparenting container (parallel)"); |
132 | int index = | 131 | int index = |
133 | move_dir == WLR_DIRECTION_RIGHT || move_dir == WLR_DIRECTION_DOWN ? | 132 | move_dir == WLR_DIRECTION_RIGHT || move_dir == WLR_DIRECTION_DOWN ? |
134 | 0 : destination->children->length; | 133 | 0 : destination->children->length; |
@@ -137,7 +136,7 @@ static void container_move_to_container_from_direction( | |||
137 | return; | 136 | return; |
138 | } | 137 | } |
139 | 138 | ||
140 | wlr_log(WLR_DEBUG, "Reparenting container (perpendicular)"); | 139 | sway_log(SWAY_DEBUG, "Reparenting container (perpendicular)"); |
141 | struct sway_node *focus_inactive = seat_get_active_tiling_child( | 140 | struct sway_node *focus_inactive = seat_get_active_tiling_child( |
142 | config->handler_context.seat, &destination->node); | 141 | config->handler_context.seat, &destination->node); |
143 | if (!focus_inactive || focus_inactive == &destination->node) { | 142 | if (!focus_inactive || focus_inactive == &destination->node) { |
@@ -157,7 +156,7 @@ static void container_move_to_workspace_from_direction( | |||
157 | container->width = container->height = 0; | 156 | container->width = container->height = 0; |
158 | 157 | ||
159 | if (is_parallel(workspace->layout, move_dir)) { | 158 | if (is_parallel(workspace->layout, move_dir)) { |
160 | wlr_log(WLR_DEBUG, "Reparenting container (parallel)"); | 159 | sway_log(SWAY_DEBUG, "Reparenting container (parallel)"); |
161 | int index = | 160 | int index = |
162 | move_dir == WLR_DIRECTION_RIGHT || move_dir == WLR_DIRECTION_DOWN ? | 161 | move_dir == WLR_DIRECTION_RIGHT || move_dir == WLR_DIRECTION_DOWN ? |
163 | 0 : workspace->tiling->length; | 162 | 0 : workspace->tiling->length; |
@@ -165,7 +164,7 @@ static void container_move_to_workspace_from_direction( | |||
165 | return; | 164 | return; |
166 | } | 165 | } |
167 | 166 | ||
168 | wlr_log(WLR_DEBUG, "Reparenting container (perpendicular)"); | 167 | sway_log(SWAY_DEBUG, "Reparenting container (perpendicular)"); |
169 | struct sway_container *focus_inactive = seat_get_focus_inactive_tiling( | 168 | struct sway_container *focus_inactive = seat_get_focus_inactive_tiling( |
170 | config->handler_context.seat, workspace); | 169 | config->handler_context.seat, workspace); |
171 | if (!focus_inactive) { | 170 | if (!focus_inactive) { |
@@ -362,7 +361,7 @@ static bool container_move_in_direction(struct sway_container *container, | |||
362 | container_move_to_workspace_from_direction(container, ws, move_dir); | 361 | container_move_to_workspace_from_direction(container, ws, move_dir); |
363 | return true; | 362 | return true; |
364 | } | 363 | } |
365 | wlr_log(WLR_DEBUG, "Hit edge of output, nowhere else to go"); | 364 | sway_log(SWAY_DEBUG, "Hit edge of output, nowhere else to go"); |
366 | return false; | 365 | return false; |
367 | } | 366 | } |
368 | 367 | ||