window: Really propagate effective on-all-workspaces setting to transients
Commit cda95790 fixed a corner case when setting the initial workspace state of transient windows, but it still missed a case:
should_be_on_all_workspaces() returns whether the window should be on all workspaces according to its properties/placement, but it doesn't take transient relations into account.
That means in case of nested transients, we can still fail the assert:
- on-all-workspaces toplevel
- should_be_on_all_workspaces() is TRUE for the first transient's parent, as the window from (1) has on_all_workspaces_requested == TRUE
- should_be_on_all_workspaces() is FALSE for the second transient's parent, as the window from (2) is only on-all-workspace because of its parent
We can fix this by either using the state from the root ancestor instead of the direct transient parent, or by using the parent's on_all_workspaces_state.
The latter is simpler, so go with that.
Fixes #1083 (closed)
Edited by Florian Müllner