Commit graph

468 commits

Author SHA1 Message Date
Victoria Brekenfeld
5216eb50ba chore: Fix remaining clippy lints 2026-03-24 16:23:43 +01:00
Vukašin Vojinović
edc7758967 chore: update libcosmic
Improves header bar widget behavior.
2026-03-18 18:19:03 +01:00
Vukašin Vojinović
2ca99c670a chore: clippy 2026-03-18 18:19:03 +01:00
Vukašin Vojinović
d02051d16a chore: remove unneeded dependencies 2026-03-18 18:19:03 +01:00
Ian Douglas Scott
3ca15a5e1e image-copy: Always use GlesRenderbuffer in render_session 2026-03-18 01:34:33 +01:00
Ian Douglas Scott
c0c7a26178 Move some trait bounds to definition of AsGlowRenderer
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.
2026-03-18 01:34:33 +01:00
Ian Douglas Scott
0d6c83db31 Revert "Move some trait bounds to definition of AsGlowRenderer"
This reverts commit c860fcddad.

Accidentally pushed to wrong branch.

If only branch protection has a way to prompt for overriding rule on
push...
2026-03-11 20:08:33 -07:00
Ian Douglas Scott
87a7d20b33 Revert "image-copy: Always use GlesRenderbuffer in render_session"
This reverts commit 398fcc896b.

Accidentally pushed to wrong branch.

If only branch protection has a way to prompt for overriding rule on
push...
2026-03-11 20:08:26 -07:00
Ian Douglas Scott
398fcc896b image-copy: Always use GlesRenderbuffer in render_session 2026-03-11 10:16:02 -07:00
Ian Douglas Scott
c860fcddad Move some trait bounds to definition of AsGlowRenderer
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.
2026-03-11 10:14:40 -07:00
RoyalOughtness
98cca4f3b7 feat: add --no-xwayland argument for running without Xwayland
This leaves the default behavior in place. When --no-xwayland
is not passed, Xwayland is started. If it is passed, then
starting Xwayland is skipped.
2026-03-09 12:17:13 -06:00
Ian Douglas Scott
2ea1186723 kms: Import on device supporting format, if not advertised device
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.
2026-02-06 11:58:27 -08:00
Ian Douglas Scott
e1342fb2e3 image-copy: Use "buffer age" of 1 for capture
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.
2026-02-05 02:01:14 +01:00
Ian Douglas Scott
9bc1b6e1ee image-copy: Use damage_output() for additional damage
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.
2026-02-05 02:01:14 +01:00
Ian Douglas Scott
cac7a5aca6 image-copy: Use abstraction that's now provided by Smithay
This doesn't change much, since the Smithay implementation is based on
the `cosmic-comp` version, but made more generic. We provide our own
implementation for our workspace capture protocol, but otherwise Smithay
handles the boilerplate now.

This should not cause any change in behavior.
2026-02-05 02:01:14 +01:00
Victoria Brekenfeld
0116bc0dc2 element/surface: Fix corner radius of SSD windows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
8f7dc7f00c render/outline: Handler inner/outer radius properly and ceil thickness 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
d5734b4b68 render/shaders: Use high precision for everything 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
d1fb9087b2 render/shadow: Adjust alpha by light/dark mode 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
8c0136cec0 render/shadow: Tweak shadow variables 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
2c9857fdfc shaders: Use half-pixels for the outline 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
fc7bbd7814 render/shadow: Add physical 1px safety margin 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
40d7fea1cc render: Fix gap between outline and windows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
b6f0855a31 shell/elements: Fix corners order for clipping/shadows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
59fd732982 shell/elements: Handle clipping and shadows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
94d49210e6 shaders: Add drop-shadow shader 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
2f39c9682c shaders: Add clipped-surface shader 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
7b8fca9ece wayland/dmabuf: Send initial surface feedback 2026-01-08 00:20:18 +01:00
Victoria Brekenfeld
d17a4ead68 kms/surface: Simpify surface feedback creation 2026-01-08 00:20:18 +01:00
Victoria Brekenfeld
85d8b8dc06 kms/surface: Clear feedback on resume 2026-01-08 00:20:18 +01:00
Victoria Brekenfeld
2eff4607bd kms/device: Advertise texture_formats instead of render_formats 2026-01-08 00:20:18 +01:00
Victoria Brekenfeld
ca00df0b37 kms: Track active clients instead of active buffers 2026-01-08 00:20:18 +01:00
Victoria Brekenfeld
6288789842 kms: Only pause device after all surfaces are successfully suspended 2025-12-04 22:29:39 +01:00
Victoria Brekenfeld
7c3e18b588 surface: Don't crash due to weird state after resume 2025-12-04 22:29:39 +01:00
Vukašin Vojinović
1f7f0c70b7 chore: format for Rust 2024 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
0a8da05847 fix(kms): early exit when iterating over crts
Clippy noted that this loop doesn't actually loop, so maybe this fixes some issues.
2025-10-22 23:55:11 +02:00
Vukašin Vojinović
b6c5d00bec cargo fmt 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
5e9ea93819 chore: manual clippy 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
0847247c33 chore: clippy 2025-10-22 23:55:11 +02:00
Ashley Wulber
3465ce7602 feat: corner radius for CosmicMapped 2025-10-03 20:11:16 +02:00
Ashley Wulber
c6320eec0c fix: support per-corner radius
also adjusts the radius by half of the outline thickness. I believe this is the radius at the center of the outline.
2025-10-03 20:11:16 +02:00
Ashley Wulber
b3aa10436a feat: corner-radius protocol support 2025-10-03 20:11:16 +02:00
Victoria Brekenfeld
b83e9f1d32 config: Make read_outputs failable
Previously we ignored when we had no output configuration
**and** failed to apply the automatically created one.

This leads to two problems:
- If this happens on startup, we end up with no outputs being added to the shell and we quit.
- If this happens later, we might end up in an inconsistent state, where the shell thinks we have an output, when it didn't light up for similar reasons.

Thus `read_outputs` is failable and handling that very much depends on
the where is was called from, because `read_outputs` doesn't know what
configuration was active before.

Thus make it failable and provide useful mitigations everywhere
possible:
- Try to enable just one output in case we fail on startup.
- Don't enable any additional outputs, when we fail on hotplug.
- Log the error like previously in any other case (and come up with more
  mitigations, once we understand these cases better).
2025-09-15 09:13:00 +02:00
Victoria Brekenfeld
cd1117080c kms: Don't join on DrmSurface drop 2025-09-11 00:20:14 +02:00
Victoria Brekenfeld
7684cd1b2c render: Fix shader obj leak 2025-09-08 14:47:06 +02:00
Victoria Brekenfeld
a0f8c4ed99 kms/surface: Cleanup unused software-rendering code 2025-09-08 13:07:40 +02:00
Victoria Brekenfeld
3935de018e kms: evdi cursor work around 2025-09-08 13:07:40 +02:00
Victoria Brekenfeld
b7fd4bc781 kms/device: Fix render_formats 2025-09-08 13:07:40 +02:00
Victoria Brekenfeld
18a1ba2d26 kms: Don't consider software devices for primary 2025-09-08 13:07:40 +02:00
Victoria Brekenfeld
6eb5ca1f94 kms: Close drm fds via session 2025-09-08 13:07:40 +02:00