mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
Send floating container to scratchpad when a child is focused
This commit is contained in:
parent
538e083f61
commit
9d1f6e095b
@ -308,6 +308,15 @@ static struct cmd_results *move_to_scratchpad(struct sway_container *con) {
|
|||||||
con = container_wrap_children(con);
|
con = container_wrap_children(con);
|
||||||
workspace->layout = L_HORIZ;
|
workspace->layout = L_HORIZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the container is in a floating split container,
|
||||||
|
// operate on the split container instead of the child.
|
||||||
|
if (container_is_floating_or_child(con)) {
|
||||||
|
while (con->parent->layout != L_FLOATING) {
|
||||||
|
con = con->parent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (con->scratchpad) {
|
if (con->scratchpad) {
|
||||||
return cmd_results_new(CMD_INVALID, "move",
|
return cmd_results_new(CMD_INVALID, "move",
|
||||||
"Container is already in the scratchpad");
|
"Container is already in the scratchpad");
|
||||||
|
Loading…
Reference in New Issue
Block a user