Commit graph

870 commits

Author SHA1 Message Date
Victoria Brekenfeld
8f7dc7f00c render/outline: Handler inner/outer radius properly and ceil thickness 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
1e0c4f9b05 layout/tiling: Fix render order of group backdrop when swapping 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
f0b384e240 layout/tiling: Adjust corner radius by scale 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
15bbada498 shell/element: Don't render decorations for dead windows 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
23e1bae96e layout/tiling: Skip unnecessary stack window swap 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
5c656de9d4 shell/window: Respect sharp corners when tiled 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
fdf865b154 shell/window: Enable resize-border for clipped windows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
4854f8e42d shell/elements: Don't render border when maximized 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
b6f0855a31 shell/elements: Fix corners order for clipping/shadows 2026-01-13 19:12:22 +01:00
Victoria Brekenfeld
e887e185a7 shell/elements: Don't clip maximized windows/stacks 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
Victoria Brekenfeld
d708e18278 focus: Restore focus to swap group 2026-01-12 17:47:28 +01:00
mikairyuu
15b6b678c1 fix(shell): distinguish between unmapping and destroying surfaces
Previously, `unmap_surface` automatically pushed all unmapped windows
into the `pending_windows` list. This behavior is correct for X11
windows (which may be remapped) but incorrect for Wayland `toplevel_destroyed`
events, where the role is permanently gone.

This caused issues with clients like Telegram that reuse `wl_surface`s.
Because the destroyed toplevel remained in `pending_windows`, a
subsequent cleanup commit (e.g., null buffer) triggered a configure
event. This prematurely marked the surface as `configured` in the
shell state.

Consequently, when the client attached a new `xdg_toplevel` role,
the compositor skipped the mandatory initial configure event (assuming
it was already done), causing the window to never appear.

This refactors `unmap_surface` to return `Option<PendingWindow>`
instead of mutating global state.
- XWayland: Explicitly saves the pending window (behavior preserved).
- XDG Shell: Drops the pending window, preventing ghost state interactions.

Fixes #1816
2026-01-09 14:50:55 -07:00
Victoria Brekenfeld
e6a3a3a9c9 xwm: Set xcursor variables in Xresources db 2026-01-09 20:49:56 +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
Victoria Brekenfeld
dc5a9fac66 element/surface: Simplify surface feedback selection using the frame_time_filter 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
Konstantinos
8a5d78dbb0 fix(zoom-ui): Persist accessibility_zoom increment config value. 2025-12-23 15:01:28 +01:00
Vukašin Vojinović
bb05037db2 chore: bump MSRV to 1.90 2025-12-22 16:29:22 +01:00
Ian Douglas Scott
fa88002ba4 tiling: Add placeholder when tree is empty 2025-12-09 16:58:59 -07:00
Ian Douglas Scott
67d0a825d1 grabs/moving: cleanup drag in tiling layer if window doesn't exist 2025-12-09 16:58:59 -07:00
Victoria Brekenfeld
813dd0ce1c layout/tiling: Always send output_enter after swap 2025-12-09 16:58:44 -07:00
Victoria Brekenfeld
77d3605fb9 Update smithay for DnD updates 2025-12-04 20:17:12 +01:00
Victoria Brekenfeld
123add9dee shell: Add DelayGrab for client initiated move requests 2025-12-03 11:46:31 +01:00
Hendrik Hamerlinck
714e80366d fix: properly remove elements from the focus_stack
shift_remove could not delete the element in it's stack because
indexmap::Equivalent requires the hashes to be equivalent
2025-12-02 07:04:09 -08:00
Ian Douglas Scott
f065143d3e dbus: Implement org.freedesktop.a11y.Manager protocol
This protocol is now the upstream solution in at-spi2-core/orca for
registering keyboard grabs and watching key events. It should also be a
bit better than the current verious of our custom Wayland protocol for
this purpose.

Like Mutter and Kwin, we currently restrict this to only be called by
the client that holds the name `org.gnome.Orca.KeyboardMonitor` on the
session bus. We also send the `KeyEvent` signal only to registered
watchers, rather than broadcasting, as DBus does by default.
2025-11-24 13:53:05 -08:00
Victoria Brekenfeld
8624928052 gestures: Cycle through workspaces 2025-11-21 09:10:01 -07:00
Ian Douglas Scott
282d76ef34 Set X11Surface hidden when a surface is minimized
This seems for an SDL XWayland client to restore fullscreen after
unminimize, it needs to see the `_NET_WM_STATE_HIDDEN` state get set
and unset.

In general `_NET_WM_STATE_HIDDEN` does not seem to cover all the
cases covered by waylands "suspended" state, so let's not equate them.

https://github.com/pop-os/cosmic-comp/issues/1510
2025-11-18 22:26:04 +01:00
Victoria Brekenfeld
84f1d6b7a9 shell: Change fullscreen restore info on move 2025-11-13 09:33:50 -07:00
Victoria Brekenfeld
c1e5a3ee3d shell: Tile windows moved to a tiled workspace 2025-11-13 09:33:50 -07:00
Victoria Brekenfeld
7e63b99cd5 shell: Moved minimized windows should stay minimized 2025-11-11 20:20:54 -07:00
Victoria Brekenfeld
5fc5a223c7 shell: Remove minimized state on unmap 2025-11-11 20:20:54 -07:00
Victoria Brekenfeld
41d0cd8d2b layout/tiling: Fix crash swapping across workspaces 2025-11-11 20:20:04 -07:00
Victoria Brekenfeld
e5ea486ea0 shell/stack: Don't reset previous_keyboard on noop set_active call 2025-11-11 20:18:58 -07:00
Peter Krull
6c01631f51 cargo fmt 2025-11-11 20:12:22 -07:00
Peter Krull
fc9fe59ed9 Fix bars when full screen, reposition popups 2025-11-11 20:12:22 -07:00
Ian Douglas Scott
e129094bfb Update smithay
Updates for `last_acked`, etc. API changes in
https://github.com/Smithay/smithay/pull/1817.

Includes layer shell fixes
from https://github.com/Smithay/smithay/pull/1819.
2025-11-11 21:27:57 +01:00
Ian Douglas Scott
9816b18259 Define a with_toplevel_state, generic over pending bool
Reduces a bit of duplication.
2025-11-11 21:27:57 +01:00
Ashley Wulber
e55d16b87b fix: unset grab if focusing exclusive layer shell surface 2025-11-05 15:49:22 +01:00
Ian Douglas Scott
7fd033295f focus-stack: Keep dragged surface in focus stack in move_request()
Replacement for https://github.com/pop-os/cosmic-comp/pull/1687, that
works correctly with multiple outputs.

We don't want another window to show a focus indicator while a window is
being dragged, so keep the window in the focus stack. If a window is
being moved out of a stack, change the focus from the stack to the
window.

`refresh_focus_stack()` doesn't seem to be called here, but for good
measure, make sure that calling that function also won't remove a
`CosmicMapped` from the focus stack if it is currently part of a move
grab for the seat.
2025-11-04 15:41:08 -08:00
Ian Douglas Scott
e09fcec9f3 Use keyboard focus target rather than focus_stack in keybindings
`Action::Close` already used the keyboard focus target, but some other
bindings didn't. Presumably it's most intuitive if all "current window"
key bindings affect the window with keyboard focus.

These used the focus stack on the `focused_output()` (the one with
keyboard focus), so I guess the main impact is when the keyboard target
is a window being dragged? Then the binding will operate on that window,
or have no effect.

This seems related to some of the behaviors discussed in
https://github.com/pop-os/cosmic-comp/issues/453.
2025-11-04 15:41:08 -08:00
Ian Douglas Scott
12857672f6 Use shift_remove() instead of retain() in unmap_element() 2025-11-04 15:41:08 -08:00
Ian Douglas Scott
f230a23bd0 focus-stack: Use IndexSet::shift_remove() for remove
This seems like the correct way to use an `IndexSet`. It shouldn't be
possible to have multiple entries that match, since it's a "set".

We can't define `Borrow<CosmicMapped> for FocusTarget`, so the blanket
impl of `indexmap::Equivalent` won't work, but implementing seems fine.
2025-11-04 15:41:08 -08:00
Ian Douglas Scott
505e36dcda Make CosmicWindowInternal/CosmicStackInternal not Clone
`IcedElement` uses `Arc` internally (and compares with `Arc::ptr_eq`).
So these structs are never cloned, and probably shouldn't be.
2025-11-04 15:41:08 -08:00
Yureka
a74b6e3a9b Add hooks for custom window decorations
This is a first use of the new hooks system, which allows customizing
cosmic-comp at compile-time.
In this case, the view() function of CosmicWindow / CosmicStack is
hooked and the hook can change what is rendered as the header bar.

Signed-off-by: Yureka <yuka@yuka.dev>
2025-10-29 11:27:14 +01:00
Vukašin Vojinović
1f7f0c70b7 chore: format for Rust 2024 2025-10-22 23:55:11 +02:00