raboof / notion

Tiling tabbed window manager
https://notionwm.net/
GNU Lesser General Public License v2.1
268 stars 63 forks source link

Rescue the client window group instead of the client window on unsplitting #353

Closed C4tion closed 1 year ago

C4tion commented 1 year ago

Rescue the client window group instead of the client window on unsplitting. Also small stuff I stumbled upon.

Someone who knows what they are doing should review this. It might fail spectacularly in some cases. I have no clue why every client window is managed by a client window group.

Generating a graph of the objects and managing relation helped debugging the issue:

echo "digraph managing {$(notionflux << EOF | grep -v '^nil$'

function label(sub)
    return tostring(sub) .. (sub:name() and " (" .. sub:name() .. ")" or "");
end

function dump(sub)
    print("\"" .. label(sub:manager()) .. "\" -> \"" .. label(sub) .. "\";");
    return true;
end

notioncore.clientwin_i(dump)
notioncore.region_i(dump)

EOF
)}" | dot -Tpng -o /tmp/graph.png

fixes #316

raboof commented 1 year ago

/cc @dkogan would you have a chance to look at / test this?

dkogan commented 1 year ago

A quick test says that the cant-unfullscreen-window bug is gone. Thanks! I'm not familiar-enough with the code to say anything more