Having if conditions for these is unnecessary when they should never be
reached. (This is commonly unwrapped in `smithay`.)
Some of these else conditions fail to call `data_init.init` with a new
id, so they'd result in a crash later anyway.
This meant that, for windows that were not fully opaque, there was no
way to capture their transparency. No way to put a window with
transparency on top of a background in OBS, for example.
If an individual window was being screencast, and that window was not
visible, for example because it was minimized, that window would only
be rendered every 995ms, which did not look good on the screencast.
Now, non-visible windows with active screencopy sessions, as well as
windows that are mapped on non-visible workspaces with active
screencopy sessions, are rendered every 1/60th of a second, which
matches the frame rate of the video produced by
xdg-desktop-portal-cosmic. In future, it might be good to let
screencopy clients suggest a redraw rate for captured windows.
`Output` in Smithay doesn't track if the output still exists, other than
based on whether or not it has strong references. Which doesn't seem to
be working correctly.
There may be leaked strong references to `Output`s somewhere, and maybe
Smithay should track if an output is still valid, generally when it is
exposed as a Wayland global
(https://github.com/Smithay/smithay/issues/1584). But a check like this
works for now.
Addresses https://github.com/pop-os/cosmic-comp/issues/985.
Previously, changing the resolution, scale, or orientation of a display
left tiling layouts that don't fill the screen and/or extend off of the
screen area, until an action like opening a window makes it recalculate
window positions.
Now this is done immediately when the output configuration changes.
Perhaps we should consider if we want a different animation for things
like rotating a screen, but the current behavior isn't too bad.
For floating layouts, `refresh` already remaps windows that are out of
bounds for the output, so this doesn't change that. Perhaps decreasing
the resolution (or moving to a lower resolution output) should try to
reduce the window size. But the current behavior generally seems okay.
This commit changes the snapping indicator's thickness to match the active window hint, per design recommendation by Maria. The thickness for this outline never goes under 1, also per Maria's spec.
Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>