Commit graph

159 commits

Author SHA1 Message Date
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
7684cd1b2c render: Fix shader obj leak 2025-09-08 14:47:06 +02:00
Ian Douglas Scott
905d021552 screencopy: Use send_success_when_ready for other forms of capture
A little annoying to add a `loop_handle` argument to `render_output`,
but generally straightforward.
2025-08-21 17:09:49 +02:00
Ian Douglas Scott
28e9024681 kms/surface: Define a PendingImageCopyData, instead of using tuple
Adding anything else to this tuple is awkward; defining a simple struct
makes this cleaner.

This also adds a `sync` property, which will come in handy later.
Containing simply the same-named argument that was passed to
`submit_buffer`.
2025-08-21 17:09:49 +02:00
Ian Douglas Scott
f0e0084608 Update smithay, and adjust to use sync points from blit calls 2025-08-21 17:09:49 +02:00
Vukašin Vojinović
7f7ab8bcbe chore: Rust 2024 edition
Set the formatting style to 2021 edition to avoid disrupting existing work.
Remove when possible.
2025-08-21 13:10:11 +02:00
Victoria Brekenfeld
be1424f1ca render/wayland: filter scanout candidates by frametime estimation 2025-08-07 19:40:23 +02:00
Victoria Brekenfeld
adedb705e7 shell: handle fullscreen windows on a dedicated layer
I hoped to split this up into multiple commits, but the api
changes to `shell/workspace.rs` were to invasive to feasibly do this.

Here is a rough list of changes:

- Fullscreen windows aren't mapped to other layers anymore
  - This they need their own logic for:
    - Sending frames
    - Dmabuf Feedback
    - Primary outputs
    - On commit handlers
    - cursor tests
  - They get their own unmap/remap logic
  - They get a new restore state similar to minimized windows
    - Refactored the minimized window state to reuse as much as possible
      here
  - They need to be part of focus stacks, which means adjusting them
    to a new type `FocusTarget` as they previously only handled
    `CosmicMapped`.
  - Various shell handlers (minimize, move, menu) now have dedicated
    logic for fullscreen surfaces
    - This was partially necessary due to relying on CosmicSurface now,
      partially because they should've had their own logic from the
      start. E.g. the context menu is now reflecting the fullscreen
      state
- Fullscreen windows may be rendered behind other windows now, when they
  loose focus.
  - This needed changes to input handling / rendering
2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
465813c1c5 shell: Using parking_lot's RwLock for fairness guarantees 2025-05-27 20:00:21 +02:00
Ian Douglas Scott
982af8ff10 Update smithay with ContextId changes
The new type bounds seem to be addressable using `AsGlowRenderer`.

Though things like this will need a different solution when we want to
support Pixman rendering.
2025-04-29 14:42:07 +02:00
Victoria Brekenfeld
7c222ae6d1 debug: Fix crashes and deadlocks 2025-04-28 18:03:09 +02:00
Victoria Brekenfeld
0ba0a0cdaa a11y/zoom: zoom level per output 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
7a8577592d kms: Support screencopy cursor modes with active filters 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
7373b3f513 backend: Support screen filters in nested mode 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
18335c6758 kms: Refactor out postprocessing helpers 2025-03-24 19:10:52 +01:00
Ian Douglas Scott
1387535252 Fix dependency_on_unit_never_type_fallback warning on latest Rustc
Apparently in Rust 2024, the inferred type here would be `!`, which
doesn't implement `Default`. Explicitly use `()` instead.

https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html
2025-03-14 17:50:17 +01:00
Peter Krull
ad2cba324e fix: Remove extra scaling of borders 2025-03-12 16:55:00 +01:00
Victoria Brekenfeld
95b27637ae chore: smithay update 2025-03-12 16:50:58 +01:00
Victoria Brekenfeld
909ca8cf9d zoom: Seperate animating/current focal_point 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
f72d2b91f3 shell: Add zoom UI 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
531a1c951f zoom: Handle multiple outputs 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
2e2943d99c render: Scale contents according to zoom_level 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
afae9bb962 render: Scale indicator radius with scale 2025-02-07 13:32:30 +01:00
Ian Douglas Scott
005093b622 Update smithay-egui, egui 2025-01-15 20:08:02 +01:00
Ian Douglas Scott
b685512127 Migrate away from Rectangle::from_loc_and_size
Deprecated in `smithay` by https://github.com/Smithay/smithay/pull/1621.
2025-01-07 12:50:35 +01:00
Victoria Brekenfeld
42af2af37d render: Fix race during startup 2025-01-07 12:09:42 +01:00
Victoria Brekenfeld
db13eea91c shell: Allow active workspace to be None 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
8b87d6524e kms: Use new DrmOutput api 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
f12f4db0e1 chore: Update smithay 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
51c8588f89 render: Use render_input_order 2024-10-22 19:43:47 +02:00
Ian Douglas Scott
a96394f7a6 Update egui, smithay-egui, smithay 2024-10-02 23:55:10 +02:00
Christian Meissl
afdb656778 dnd: correct handling of cursor buffer offset 2024-09-23 11:13:21 +02:00
skewballfox
7da0bc430a added cursor_follows_focus and focus_follows_cursor 2024-09-04 20:22:40 +02:00
Ian Douglas Scott
c48dc1107f Update smithay and smithay-egui 2024-08-21 09:26:13 -06:00
Ian Douglas Scott
87020c79ba Define a RendererRef enum, referencing multi or glow renderer
Avoids a little duplication (matching two variants, instead of three
backends).

The behavior, including errors and panics, should be unchanged for now.
Performance should also not be impacted.

This should help for adding llvmpipe rendering without a device node on
the kms backend, or for adding a variant for pixman.
2024-08-07 10:49:39 -07:00
Ian Douglas Scott
9c65476091 Set ElementFilter in render_output to match kms backend
This way the same behavior will apply in winit/x11 backends.
2024-07-15 17:12:05 +02:00
Ian Douglas Scott
0636bcdef3 Add workspace_overview_is_open function; put in a utils::quirks mod
This is increasingly not just related to screencopy, so it's weird to
add there. I don't see any other module that fits, so add one called
"quirks" (like the Linux kernel uses for device-specific handling in
generic drives).
2024-07-15 17:12:05 +02:00
Ian Douglas Scott
355b142c52 When cosmic-workspaces is shown, render only layer-shell surfaces
This allows `cosmic-workspaces` to rely on cosmic-comp for rendering the
background, and just have transparency. This should be a more reliable
and performant way of doing things, at least for now.

Instead of adding another opaque bool argument, this defines an
`ElementFilter` enum, which makes calls more readable.

Window surfaces are still included in screencopy, as needed for the
workspace previews.
2024-07-15 17:12:05 +02:00
Ian Douglas Scott
94fecec9cb Add a SplitRenderElements type, with useful methods
`(w_elements, p_elements)` tuples are used in a bunch of places. A
struct with named fields is generally an improvement just due to the
fact the order is non-obvious.

But we can also add methods. In particular,
`extend_from_workspace_elements` abstracts out some of the more
redundant code in `workspace_elements`.

It would be nice to avoid allocation everywhere, but iterators would
complicate lifetimes, run into issues with needing multiple mutable
borrows to things like the `Renderer`, and be awkward in certain
functions without generator syntax. In any case, cosmic-comp already
relies on allocating vectors here.

If this abstraction is commonly useful in compositors, perhaps it could
be moved to Smithay.
2024-07-15 17:12:05 +02:00
Victoria Brekenfeld
c506d94ac8 shell: Don't consider active overviews animations 2024-07-15 16:31:24 +02:00
Victoria Brekenfeld
06c12040f9 render: Fix grey screen on workspace switch 2024-06-28 12:31:50 +02:00
Victoria Brekenfeld
ddcb435632 debug: Fix running with new kms backend 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
cc0bbb61e3 debug: Drop FPS struct for kms timings 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
469a366207 kms: New backend
New backend utilizing a thread per surface for precise frame
scheduling.
2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
3b7bba3add debug: Drop puffin, interactivity, renderdoc 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
cf0b0f9d2d chore: Move some rendering-related state into the shell 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
c7d50e7c5b seat: Make render-related state thread-safe 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
bd58481d19 element: Introduce CosmicMappedKey for safely hashing windows across threads 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
e78e199663 chore: Update smithay for thread-safety 2024-06-26 12:59:33 +02:00