Commit graph

155 commits

Author SHA1 Message Date
KENZ
977d4c2dca refactor: make get_popup_toplevel() PopupKind agnostic
- for preparation to make unconstrain_popup() PopupKind agnostic.
2026-05-07 15:00:24 -06:00
Hojjat
fdf015cbcf fix: consider SSD/tab height when calculating last server size 2026-04-20 12:08:47 -06:00
Salvatore Gabriele La Greca
9ad5c916f3
layout/floating: allow size altering if window was maximized (#2038) 2026-03-27 11:56:34 +01:00
Vukašin Vojinović
2ca99c670a chore: clippy 2026-03-18 18:19:03 +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
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
Ilia Malanin
3f68eee846 shell: Extract FloatingLayout::snap_to_corner to deduplicate snap restore logic 2026-02-24 00:55:49 +01:00
Ilia Malanin
4565514e76 shell: Preserve snapped state through fullscreen/minimize round-trips 2026-02-24 00:55:49 +01:00
Victoria Brekenfeld
e4e7567174 element: Clip to tile size if available instead of element geometry 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
6d0f1b273f layout/tiling: Resize shadows to fit scaled windows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
a28b11cd5b floating: Animate shadow position with the window 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
2adebb5fe1 config: Add and propagate appearance_config 2026-01-13 19:12:22 +01:00
Ian Douglas Scott
612ff2f523 layout/floating: In unmap, don't alter size if no pending changes
If the intent here was that the `if let` would only handle the case
where there are pending changes, then something like this should be
right.

Seems to fix behavior in
https://github.com/pop-os/cosmic-comp/issues/1819.
https://github.com/pop-os/cosmic-comp/issues/1645 may be the same issue.
2026-01-08 16:51:59 -07:00
Vukašin Vojinović
1f7f0c70b7 chore: format for Rust 2024 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
2873d6b27e fix(corner-radius): properly handle no value, and use geometry 2025-10-03 20:11:16 +02:00
Ashley Wulber
6f93b8774d cleanup use statements 2025-10-03 20:11:16 +02:00
Ashley Wulber
f01ebf2f6f refactor(corner-radius): corner_radius method for CosmicSurface 2025-10-03 20:11:16 +02:00
Ashley Wulber
8ddd14a54f cleanup: remove TODOs 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
f339e21479 floating: Keep elements positioned relatively on recalculate 2025-09-22 18:07:10 +02:00
Victoria Brekenfeld
c3d2b5f0b7 element: Allow overriding default scanout behaviour 2025-08-07 19:40:23 +02:00
Victoria Brekenfeld
9f4db0b28b floating: Properly scale positions on migration (fixes #1167) 2025-08-04 17:11:46 +02:00
Victoria Brekenfeld
befcdadf88 floating: animation fixes 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
77084ba1cc floating: Return pending geometry on unmap 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
83ed79af16 workspace: Consistently set minimized state 2025-07-04 19:45:54 +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
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
a1211e2499 floating: Refresh space after mapping 2025-03-07 14:37:17 +01:00
Victoria Brekenfeld
638684642c stack: Remember position during continuous move action 2025-03-05 18:24:28 +01:00
Victoria Brekenfeld
a57a2163f6 floating: Fix resize indicator order 2025-02-20 20:11:40 +01:00
Daniel
2553810621
grabs: Snap Window Edges to Close Output Edges 2025-02-14 11:58:09 +01:00
Victoria Brekenfeld
f6143747da layout/floating: Fix indicator element order 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
53d2cf01aa floating/resize: Fix broken global geometry 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
e217a91fec floating: Throttle resizes 2025-01-16 19:44:12 +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
Ian Douglas Scott
61692b21ad Run cargo format 2024-11-18 18:24:53 +01:00
Victoria Brekenfeld
0092dac08c input: Use render_input_order 2024-10-22 19:43:47 +02:00
Victoria Brekenfeld
51c8588f89 render: Use render_input_order 2024-10-22 19:43:47 +02:00
skewballfox
7da0bc430a added cursor_follows_focus and focus_follows_cursor 2024-09-04 20:22:40 +02:00
julianbraha
52ad30c264 Remove unnecessary lifetimes 2024-08-30 17:53:56 +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
b9a323c9ff shell: Populate focus_stack when unstacking 2024-07-03 21:04:28 +02:00