mirror of
https://github.com/swaywm/sway.git
synced 2025-11-12 13:29:56 -05:00
Operate on floating split container when a child is focused
This commit is contained in:
parent
902a1402ba
commit
936168e740
3 changed files with 27 additions and 2 deletions
|
|
@ -29,6 +29,14 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
|
|||
seat_set_focus(config->handler_context.seat, container);
|
||||
}
|
||||
|
||||
// If the container is in a floating split container,
|
||||
// operate on the split container instead of the child.
|
||||
if (container_is_floating_or_child(container)) {
|
||||
while (container->parent->layout != L_FLOATING) {
|
||||
container = container->parent;
|
||||
}
|
||||
}
|
||||
|
||||
bool wants_floating;
|
||||
if (strcasecmp(argv[0], "enable") == 0) {
|
||||
wants_floating = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue