Everything implementing `AsGlowRenderer` implements `Renderer` and various
other traits, and by making `AsGlowRenderer` depend on these trait,
things requiring `AsGlowRenderer` can avoid listing those traits as
well.
Looks like implied trait bounds still won't work for the
`Self::TexutureId` and `Self::Error` requirements? So those are not
included here.
Fractional scaling was broken when the fractional part was .75 as
the round rounded up the WindowScalingFactor to the upper bound and
applied extra scaling in addition to the one in UnscaledDPI (1.75 *
2 for 175% scaling instead of 1.75 * 1)
The remap-on-restore workaround was introduced in 3b9d0ce
("HACK: Remap minimized X11 windows on restore"), but forcing an
unmap/map cycle on unminimize now regresses Steam: restoring a
non-fullscreen window can leave the main surface black while input
and tooltips still work.
Keep the existing X11 hidden-state handling and only drop the
forced remap cycle. This preserves the newer minimize/unminimize
signaling for X11 clients while avoiding an extra restore-time
remap.
Fixes#2081
This also reverts commit 0f7e53b, because the upstream commit (2e00119)
that introduced this thing was reverted
(https://github.com/Smithay/smithay/pull/1941).
There was also change in the cursor_capture_constraints signature in
smithay 7d992793f.
Previously, drag placeholder would be removed in the call to
`tiling_layer.drop_window()` when dropping onto a tiling layer, but
would not be removed when dropping to a floating layer. Which would
leave a placeholder taking up space, and cause a panic on a future drag
operation.
Instead, call `cleanup_drag()` regardless, after `drop_window()`, to do
any cleanup that is still needed. This moves the call that was
previously added in 67d0a825.
Since `copy_clone()` preserved IDs, `traverse_pre_order_ids()` can be
called on the old tree, without collecting into a `Vec`.
Then we can also `copy_clone()` only if there's actually a change, and
also only call `push_tree()` in that case.
(Once the `LazyCell::get()` stabilization is released, we could use
that here, but `Option::get_or_insert_with()` may be more readable
anyway.)
With this, `cleanup_drag()` should be pretty low-cost, so we shouldn't
have to worry about whether or not it's redundant.
Fixes https://github.com/pop-os/cosmic-epoch/issues/2978.
This reverses the part of
ca00df0b37 that made it
only try import on the advertised GPU. But this version avoids
initializing an EGL context simply to re-check the supported texture
formats.
The logic `age_for_buffer` used seems to be a misinterpretation of the
protocol.
The wording is a little unclear, but it seems tracking buffer age is the
responsibility of the client, and the client is required to accumulate
damage and pass it in `damage_buffer`.
Our clients initially weren't doing that correctly. I updated
xdg-desktop-portal-cosmic to use `damage_buffer` after testing on
wlroots, and cosmic-workspaces was recently updated as well.
The important change here is that we now apply the additional damage
first, instead of using `.extend()` to add it after other elements. This
is important since `OutputDamageTracker` will ignore our damage elements
if there are behind an element with an opaque region.
This also makes things a bit simpler, especially `take_screencopy_frames()`,
which no longer needs a mutable references to extend then truncate.
The implementation of `OutputDamageTracker` isn't entirely clear, but as
far as I can tell this is intended to work, and it seems to work in some
testing.