Commit graph

2097 commits

Author SHA1 Message Date
Victoria Brekenfeld
ccc4f36065 chore: update smithay 2026-06-30 18:37:42 +02:00
Frederic Laing
650768211f fix: keep windows visible until overview commits a buffer 2026-06-29 15:03:40 +02:00
Ilia Malanin
aac1e19f08 fix: set_rectangle leak 2026-06-18 13:37:14 -04:00
Victoria Brekenfeld
f032e7dbd5 shell/focus: Order sticky windows before fullscreen windows 2026-06-18 18:41:27 +02:00
Victoria Brekenfeld
106b50293b wayland/activation: Fix requests without active outputs 2026-06-18 18:29:37 +02:00
Skygrango
296b6bee23 wayland: reject cursor hint requests that are outside the surface bound 2026-06-16 14:49:28 -06:00
Skygrango
b6cab38528 wayland: implement pointer_warp_v1 2026-06-16 14:49:28 -06:00
Anthony T. Lannutti
821b431973 feat: separate logind feature from systemd
Move logind-zbus to a dedicated 'logind' feature that is independent
of the 'systemd' feature. This allows non-systemd users (e.g., OpenRC
with elogind) to access lid switch inhibition and lid status detection
without requiring the full systemd stack.

The 'systemd' feature now depends on 'logind' to maintain backward
compatibility, so existing users are unaffected.

Feature configuration:
- default: ["systemd"]
- logind: ["logind-zbus"]
- systemd: ["libsystemd", "logind", "tracing-journald"]

Resolves #2473

Coding-Agent: OpenCode
Model: claude-sonnet-4-5
2026-06-16 14:41:51 -06:00
Richard Chennault
dddf51b441
kms: skip lease resume when drm device activation fails in resume_session()
When smithay's DrmDevice::activate() returns an error (e.g. because
drmSetMaster() failed during VT resume), resume_session() was only
logging the error and then proceeding to resume DRM leases on a device
that has no master. This leaves the compositor in a broken render state
where every atomic page flip returns EPERM.

Fix: continue to the next device on activate() failure. The device
surface stays inactive and lease resume is deferred. On the next
ActivateSession event (next VT switch to this TTY), resume_session()
will be called again and activate() will succeed once the seat manager
has granted DRM master.

Reproducer: hybrid GPU system (Intel iGPU render + NVIDIA display),
VT switch away from and back to COSMIC session. On return, drmSetMaster
races the seat notification; activate() fails; without this fix
the compositor floods journald with EPERM at 60fps.

Fixes: pop-os#2331, pop-os#2302
2026-06-16 14:41:01 -06:00
Sai Asish Y
aff506bb7b fix(floating): allow remapping minimized windows
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-06-16 14:39:53 -06:00
SAY-5
69bb35e336 floating: don't panic if window disappears mid-unminimize
Signed-off-by: SAY-5 <say.apm35@gmail.com>
2026-06-16 14:39:53 -06:00
Victoria Brekenfeld
836ccbaa0b shell/stack: Cleanup previous_index on remove 2026-06-16 13:05:39 -04:00
Gavin John
d4c5714c10 perf(toplevel_info): optimize send_toplevel_to_client
PR #1279 tried to throttle `send_toplevel_to_client`, which was rejected. This takes (what I think is) a better approach, and instead makes some optimizations. We delay grabbing the mutex until it's actually needed, and we also checks to see if the state actually needs to be resent. This resolves some lock contention, and also avoids having to generate the state in the first place. Since `wayland-rs` uses a single mutex to lock the entire state, this both massively reduces lock contention and avoids making (apparently quite a lot of) unnecessary computation.

I decided to give this one to AI since I'm a bit busy right now (although I am still manually writing the commit messages and descriptions). I think it generally did a pretty good job, although I did have to make a few manual tweaks. While I don't have any empirical data, cosmic-comp idle CPU has gone down from ~3% all-core to 0-0.5%, even stress testing it with far more windows open. I can't say it *liked* opening 30-some windows in 2 seconds, but after it finished opening them all, it was still buttery smooth. Overall very happy with the results.

Assisted-by: Claude:claude-4-opus
2026-06-16 18:09:28 +02:00
Robin Nehls
db0b1afeb5 feat: allow naming pinned workspaces 2026-06-15 23:11:31 +02:00
Hojjat
8f5f7c897d fix: add git hash to .cargo/config when vendoring 2026-06-15 12:16:32 -06:00
Hojjat
e576a87f5b Revert "fix: use SOURCE_GIT_HASH when building for pop ci"
This reverts commit 94e9437c4e.
2026-06-15 12:16:32 -06:00
Joseph Buckingham
52b3f930a8 fix: debug build pinning panic 2026-06-12 11:45:59 -06:00
Ilia Malanin
31f317d16b fix: skip dead windows in floating set_output 2026-06-12 13:08:14 +02:00
Michael Aaron Murphy
f95b62635d feat(tiling-exceptions): add exception for Thunderbird message compose dialog 2026-06-11 09:23:38 -06:00
Michael Aaron Murphy
5ca8cc2cdf feat(tiling-exceptions): add exception for Slack huddle preview 2026-06-11 09:23:38 -06:00
Hojjat
0312f9a201 fix: draw the focused window border for the current window only 2026-06-09 23:21:26 -04:00
Ian Douglas Scott
5153d497e7 fix(dbus): Block on creation of zbus connection to avoid deadlock
A fix for the issue reported in
https://github.com/pop-os/cosmic-comp/pull/2450.

Using `block_on` in some places for zbus calls is fine (that's what
zbus's blocking API does; it has its own executor for background tasks),
but this is problematic with `async_once_cell`. If we also use that in
the calloop async executor.

I think ideally we should avoid blocking the main thread on any async
tasks, but for now we can just block in initialization here.
2026-06-09 18:09:36 -04:00
Hojjat
94e9437c4e fix: use SOURCE_GIT_HASH when building for pop ci 2026-06-09 18:07:07 -04:00
Ian Douglas Scott
651877e622 image-copy: Adjust cursor position for subsurface offset
The `themed_window` example of `smithay-client-toolkit` is a good test
for this.
2026-06-09 10:42:48 -07:00
Ian Douglas Scott
84d2a9d297 shell: Fix definition of surface_tree_offset()
Using `with_surface_tree_downward()` is wrong because it will traverse
other branches of the surface tree than the one containing `surface`,
and add their offsets.

It's simple enough to instead walk up the surface tree.
2026-06-09 10:42:48 -07:00
Ian Douglas Scott
7d0d374fd8 image-copy: Adjust toplevel capture coordinate for window geometry 2026-06-09 10:42:48 -07:00
Ian Douglas Scott
7a50625e78 image-copy: Fix cursor pos for toplevels with SSD 2026-06-09 10:42:48 -07:00
Ian Douglas Scott
8aea6cc158 image-copy: Function for duplicated toplevel cursor enter/motion code
Deduplicate this before making it more complicated.

Also allows early returns to avoid deep nesting. And avoid duplicating
calculations here for multiple sessions (though normally there won't be
multiple capture sessions of same toplevel with cursor metadata,
probably).
2026-06-09 10:42:48 -07:00
Ian Douglas Scott
82dcd9a46a image-copy: Don't send 0x0 buffer params for cursor capture
Fixes panics in `xdg-desktop-portal-cosmic` when it tries to use cursor
capture, and an application hides the cursor.
2026-06-09 10:42:48 -07:00
Ian Douglas Scott
4a8931896f image-copy: Subtract output position for pointer position sent to client 2026-06-09 10:42:48 -07:00
Ian Douglas Scott
b6b76e1d4a image-copy: Don't send redundantly pointer changes on fullscreen
The code for sending pointer position changes for toplevels should
handle this adequately; no need to also handle it here.
2026-06-09 10:42:48 -07:00
Hojjat
51dd3bc66f fix: pass the full window size to xwayland 2026-06-09 10:42:22 -07:00
Ian Douglas Scott
4eaaf4f55c dbus: Refactor to share DBus connections
We should avoid creating more than one session connection or more than
one system connection. We should also ideally avoid blocking the main
thread.

For now this still uses blocking in a couple places, but wrapping async
code (which is how `zbus::blocking` is implemented anyway).

This moves the `NameOwners` creation out of `A11yKeyboardMonitorState`,
so it can be shared with other things. We will likely want that for
https://github.com/pop-os/cosmic-comp/pull/465 to define a secured
protocol to pass an fd to the portal, and potentially any other
sensitive DBus protocols implemented by the compositor.
2026-06-08 19:03:50 +02:00
Ian Douglas Scott
c8d9ff1215 dbus: Remove unused return value from dbus::init
If we don't use this anyway, this can make things simpler.
2026-06-08 19:03:50 +02:00
Ian Douglas Scott
571565c28e dbus: Use calloop async executor
New version of callop has a fix for this, so we're no longer blocked
from using it.
2026-06-08 19:03:50 +02:00
Ian Douglas Scott
3c834e9c85 dbus: Use FutureSource instead of a channel 2026-06-08 19:03:50 +02:00
Robin Nehls
2f7c34f29a feat: add config option for xdg activation behavior 2026-06-03 08:09:29 +02:00
Hojjat
56f84fba2d fix: follow the focus after alt+tab to another output 2026-06-02 12:14:39 -06:00
Hojjat Abdollahi
28ef6bdbc8
feat: support multiple fullscreen windows per workspace 2026-06-02 17:48:33 +02:00
Ian Douglas Scott
9f28a764a7 chore: update smithay
Includes the fix in https://github.com/Smithay/smithay/pull/2038,
which helps addresses a regression in controller input for Steam games.
2026-06-01 07:52:42 -07:00
Skygrango
203cad8cbd shell: disable WindowUI detection if constraint is active 2026-06-01 07:52:42 -07:00
Skygrango
208c2128cd wayland: implement new_constraint, remove_constraint and cursor_position_hint for PointerConstraintsHandler
new_constraint: check if the surface has pointer focus, keyboard focus, and if the pointer is within toplevel geometry or constraint region. If these conditions are met, then enable the constraint.

remove_constraint: apply last cursor position hint that saved in seat.

cursor_position_hint: save the cursor position hints provided by the client to the seat.
2026-06-01 07:52:42 -07:00
Skygrango
4fb7d49316 chore: update smithay 2026-06-01 07:52:42 -07:00
Skygrango
81066d437a shell: remove constraint when target changed 2026-06-01 07:52:42 -07:00
Skygrango
9702aae523 input: when updating pointer in the confined mode, recalibrate to the valid coordinates 2026-06-01 07:52:42 -07:00
Skygrango
a533ac1ec3 input: implement apply_cursor_hint 2026-06-01 07:52:42 -07:00
Skygrango
e75c9c0c48 shell: implement surface_geometry_offset_from_toplevel for WorkspaceSet 2026-06-01 07:52:42 -07:00
Skygrango
d829ec3815 shell: implement has_surface for KeyboardFocusTarget 2026-06-01 07:52:42 -07:00
Skygrango
32b54cc31f shell: implement surface_offset and surface_tree_offset 2026-06-01 07:52:42 -07:00
devpa
22fe419747 input: allow layout switching and brightness/volume control under session lock 2026-05-27 16:43:39 +02:00