Commit graph

2116 commits

Author SHA1 Message Date
Victoria Brekenfeld
178c6593dc element: Introduce SurfaceRenderElement 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
8b990e5658 render: Merge FromGlesError into AsGlowRenderer 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
0ce7f11445 element/surface: Fix reported corner radius 2026-07-09 18:08:01 +02:00
maskedsyntax
067be10474 fix: fall back to legacy X11 names when loading pointer themes
Smithay requests modern shape-v1 names while themes like DMZ-White
only provide legacy X11 aliases. Try known aliases before failing to load.
2026-07-08 16:10:15 -06:00
Ian Douglas Scott
373a44d431 shell: Restore fullscreen to single-element stack
If a surface was previously a single-element stack, restore it normally
using the floating/tiling restore data, but map as a single element
stack instead of a plain window.
2026-07-07 17:46:23 -07:00
Ian Douglas Scott
98e1dd7f6b shell: Also restore stack element on sticky layer to stack 2026-07-07 17:46:23 -07:00
Ian Douglas Scott
5c0c22988e Don't unnecessarily use Option in WorkspaceRestoreData
Unless we expect to need this again in the future, it's best not to have
an `Option` here unnecessarily.
2026-07-07 17:46:23 -07:00
Ian Douglas Scott
9e6d46c17e shell: Restore fullscreen surface to stack
Previously, a surface that was in a stack that is fullscreened would be
removed from the stack, and on unfullscreening, restored to the
floating/tiling layer as though it were a new window outside the stack.

Instead, if the stack still exists, add the window to it at the same
position it previously occupied.
2026-07-07 17:46:23 -07:00
Ian Douglas Scott
f765696834 Avoid unnecessarily unwrapping stack_ref() after is_stack()
In a lot of cases, matching on `stack_ref()` also works.
2026-07-07 17:46:23 -07:00
Ian Douglas Scott
26ee83aaa7 Implement Debug and comparison with CosmicMapped for CosmicMappedKey 2026-07-07 17:46:23 -07:00
Ian Douglas Scott
29320bdab5 Add cosmic-keyboard-layout-unstable-v1 protocol
https://github.com/pop-os/cosmic-protocols/pull/28

Allows clients like `cosmic-applet-input-sources` to show which layout
group is active and update it. Currently this is implemented by update
the `xkb_config` to change the layout order.
2026-07-07 16:44:09 +02:00
Ericky Dos Santos
031fdc389a kms: change from thread_local approach to wiring scanout node through function calls to detect scanout candidates 2026-07-06 11:26:22 -06:00
Ericky Dos Santos
012c77ec81 fix(kms): gate overlay scanout per-element by buffer GPU node 2026-07-06 11:26:22 -06:00
Hojjat Abdollahi
9d52653d5c
revert: "fix: follow the focus after alt+tab to another output"
This reverts commit 56f84fba2d.
2026-07-02 17:53:03 +02:00
Alexander Daichendt
f5e0ba1594 make device DrmDevice in disable_crts 2026-07-01 21:18:43 +02:00
Alexander Daichendt
a9f2427c00 fix: internal laptop screen stuck on vendor logo with external monitor 2026-07-01 21:18:43 +02:00
Ashley Wulber
dacdc3db39 chore: workaround for Tiger Lake 2026-07-01 13:30:57 -04:00
Tom Grushka
c5775d2010 change update_focal_point to use f64 to avoid rounding errors 2026-07-01 17:56:29 +02:00
Victoria Brekenfeld
bb584aab7f backend: Don't attempt dma-copies from newer intel chips 2026-06-30 18:39:43 +02:00
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