mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 05:54:11 +01:00
add focus changing between floating containers
It will also wrap if needed.
This commit is contained in:
parent
d3f5ac8cbb
commit
379b1a0378
@ -1113,7 +1113,17 @@ swayc_t *get_swayc_in_direction_under(swayc_t *container, enum movement_directio
|
|||||||
if (can_move) {
|
if (can_move) {
|
||||||
int desired = index_child(container) + diff;
|
int desired = index_child(container) + diff;
|
||||||
if (container->is_floating) {
|
if (container->is_floating) {
|
||||||
can_move = false;
|
if (desired < 0) {
|
||||||
|
wrap_candidate = parent->floating->items[parent->floating->length-1];
|
||||||
|
} else if (desired >= parent->floating->length){
|
||||||
|
wrap_candidate = parent->floating->items[0];
|
||||||
|
} else {
|
||||||
|
wrap_candidate = parent->floating->items[desired];
|
||||||
|
}
|
||||||
|
if (wrap_candidate) {
|
||||||
|
wlc_view_bring_to_front(wrap_candidate->handle);
|
||||||
|
}
|
||||||
|
return wrap_candidate;
|
||||||
} else if (desired < 0 || desired >= parent->children->length) {
|
} else if (desired < 0 || desired >= parent->children->length) {
|
||||||
can_move = false;
|
can_move = false;
|
||||||
int len = parent->children->length;
|
int len = parent->children->length;
|
||||||
|
Loading…
Reference in New Issue
Block a user