Apply inverse of output transform to mode to get render size, and apply
no transform during rendering. The transform of the output being
mirrored from shouldn't affect the final render.
Fixes issues when source output for mirroring has a transform, and also
fixes issues in https://github.com/pop-os/cosmic-comp/pull/1058
when this code is used for postprocessing, where this resulted in the
same transform being applied twice.
Partly fixes
https://github.com/pop-os/cosmic-workspaces-epoch/issues/83, but it
seems like there's at least one other issue with workspaces not being
removed when they should be.
The if condition got a bit complicated here, so I've split it up and
inverted the condition.
If the window is part of a stack, remove it then map it outside of the
stack, before calling `Shell::move_window.` Somewhat similar to the code
in `Shell::move_request`.
It would be more elegant if `move_window` handled this in some way, but
I can't think of a way to change the API there that would be better than
this.
(Perhaps some of the naming of methods could also be updated, given
"window" in functions like this means a `CosmicMapped`.)
Protocol support for moving workspaces would also be useful, but should
involve a new protocol object representing the stack.
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/41.
Iterating over `.windows()` for each workspace does not iterate over
`minimized_windows`, so `from_workspace` was not found. Simply changing
this to use `element_for_surface` and `space_for` (like `fullscreen` and
`unfullscreen`) fixes this.
Addresses https://github.com/pop-os/cosmic-workspaces-epoch/issues/89.
Though it does unminimize the window, which we may also want to change.
This is imported given how
https://github.com/pop-os/cosmic-protocols/pull/39 uses this event.
But the protocol spec also states the event "is emitted on creation" so
this is seemingly incorrect regardless.