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>
This resulted in a somewhat weird effect, where the empty workspace at
the end on the monitor has an `output_stack` with the other output, so
a window created there is moved back to to second output when it is
re-connected. This seems unexpected.
`from_raw_parts()` is only sound if the alignment is the same, so it
can't be used to covert to a `Vec<u8>` from a type with a greater
alignment.
This isn't hard to avoid, luckily.
when i implemented the cursor-shape-v1 protocol i
didn't notice that the previous `CursorShape::Grab`
actually mapped to `CursorIcon::Grabbing` instead of
`CursorIcon::Grab`. this fixes that "regression".
Not supressing key repetition in backends seems like it was a bug, and
should be fixed as of https://github.com/Smithay/smithay/pull/1535.
So an argument for this should be unnecessary now.
This saves 7 levels of indentation, which seems like a plus.
The `InputEvent::Keyboard` branch of the `match` now fits clearly in one
screen. The `filter_keyboard_input()` method could probably still be
broken up more.
The method needs a few arguments, but it seems nice to make what it
depends on explicit.