mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
Merge pull request #407 from mikkeloscar/trigger-on-move-floating
Trigger workspace init event (floating)
This commit is contained in:
commit
ed46fa7230
1 changed files with 8 additions and 1 deletions
|
@ -308,7 +308,14 @@ void move_container_to(swayc_t* container, swayc_t* destination) {
|
||||||
swayc_t *parent = remove_child(container);
|
swayc_t *parent = remove_child(container);
|
||||||
// Send to new destination
|
// Send to new destination
|
||||||
if (container->is_floating) {
|
if (container->is_floating) {
|
||||||
add_floating(swayc_active_workspace_for(destination), container);
|
swayc_t *ws = swayc_active_workspace_for(destination);
|
||||||
|
add_floating(ws, container);
|
||||||
|
|
||||||
|
// If the workspace only has one child after adding one, it
|
||||||
|
// means that the workspace was just initialized.
|
||||||
|
if (ws->children->length + ws->floating->length == 1) {
|
||||||
|
ipc_event_workspace(NULL, ws, "init");
|
||||||
|
}
|
||||||
} else if (destination->type == C_WORKSPACE) {
|
} else if (destination->type == C_WORKSPACE) {
|
||||||
// reset container geometry
|
// reset container geometry
|
||||||
container->width = container->height = 0;
|
container->width = container->height = 0;
|
||||||
|
|
Loading…
Reference in a new issue