Commit graph

521 commits

Author SHA1 Message Date
Hojjat
80b8eb47d7 improv: round up and down sample cursor sizes to limit cache 2026-08-25 17:33:56 +02:00
Hojjat
01b79c3eae feat: scalable cursor support 2026-08-25 17:33:56 +02:00
Hojjat
f20de50e41 feat: shake cursor to find by magnifying the cursor 2026-08-21 00:39:02 +02:00
Hojjat
f4ee52c46a Ei protocol support
- Use the configured keyboard layout, track ei seats to reconfigure their keyboards
- DBus interface
- Disambiguate input devices per backend instance
- Add support for `ei_keysym` and `ei_text`
- Act as input method for ei_text UTF-8 injection
- Create a region per output for abosolute pointer position
- Map ei region for touchscreen emulation
- Release pointer buttons and keys on removal
- Send modifiers to EI connections
2026-08-17 12:22:35 -07:00
Victoria Brekenfeld
091583ac84 backend: Support wl-dmabuf v6 2026-07-29 22:08:23 +02:00
v0up3r
9514b4945e fix(kms): don't panic when renderer creation fails after a GPU reset
When the DRM device is lost transiently, for example when the amdgpu driver
performs a GPU reset and recovers ("device wedged, but recovered through
reset"), acquiring a renderer in `SurfaceThreadState::redraw` fails. The three
`renderer`/`single_renderer` calls used `.unwrap()`, so the failure panicked
the surface's render thread. Because that panic unwinds across the EGL/GBM FFI
boundary it aborts the whole process (SIGABRT), dropping the session back to
the greeter and closing every running application.

`redraw` is already fallible and its caller logs the error and reschedules a
redraw, and the frame-submission path (`render_frame`/`queue_frame`) already
propagates errors the same way. Propagate the renderer-acquisition errors too,
so a transient device loss is retried on the next frame, once the device is
back, instead of taking down the compositor.

Relates to #649.

Assisted by an AI coding tool; I have reviewed and fully understand the change
and am able to maintain it and respond to review.
2026-07-28 15:28:34 +02:00
Timo Strunk
24d29008f0 fix(kms): skip empty DRM cleanup commit in display_configuration
display_configuration() issued an ALLOW_MODESET atomic commit on every udev
event, even when no planes needed detaching. The empty commit is a no-op
modeset that interferes with in-flight commits on the render thread, and it
fails with EPERM whenever we don't hold DRM master (e.g. a render-only
secondary GPU), aborting device enumeration.

Track whether any property was added and skip the commit when there is nothing
to do. A commit that does have changes still propagates its error as before, so
a genuine failure to apply cleanup is not silently swallowed.

https://github.com/pop-os/cosmic-comp/issues/2375

Authored by Claude Opus 4.8
Reviewed by Timo Strunk <Timo.Strunk@gmail.com>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 18:17:51 -06:00
Ashley Wulber
4d370cdf92 fix: no ceil for scaled outline thickness 2026-07-21 22:22:07 +02:00
Ian Douglas Scott
dd6ebd03c9 image-copy: Hold references to Buffers to block release
The `wl_buffer` now won't be released until sync fence polls ready.
2026-07-21 17:02:58 +02:00
Vukašin Vojinović
60137c0d9e chore(render): use Affine2 where possible 2026-07-21 15:53:38 +02:00
Vukašin Vojinović
160bd39ba4 render: cgmath -> glam 2026-07-18 09:09:30 +02:00
Victoria Brekenfeld
8ab946f10a chore: clippy fixes 2026-07-16 19:43:10 +02:00
Victoria Brekenfeld
2971845d40 render/blur: Fix rotated outputs having cut off blur regions 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
4f8aed4149 blur: Fix invalid matrix inversions 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
0c805d9b30 chore: cleanup new blur code 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
f6cb4519a0 render/blur: Cache native texture type 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
c92b91221c render/element: Support converting gl-textures 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
1f0456a5af render: Include OutputId in namespaces 2026-07-09 18:08:01 +02:00
Ashley Wulber
f6d3dafda7 fix: use configured blur strength for lock surface and its subsurfaces 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
e0b6784eb5 render/blur: Wipe blur_texture before blit 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
f424abbc29 render/blur: Fix div-by-zero in shaders 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
58938ef8ee render/blur: Fix transformed outputs 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
ab9f13b36f iced: Handle blur internally 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
5ee2fa911a wayland: Support cosmic-corner-radius v2 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
55d57ddba2 chore: theme-v2 libcosmic update 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
667414bd92 renderer/blur: Fix incorrectly offset blur region 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
6868c24501 renderer/blur: Use proper commit counter 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
d4cd9b674c chore: Adjust log level for blur debugging 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
cfed174e9b chore: Fix clippy lints 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
de8b47839c render: Make blur_strength configurable 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
1c5ef576f4 render: Don't use separate damage_output calls 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
eb41b076ed render: Use NamespaceElements to fix blurred lower layer-shell surfaces 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
a9bf89d8b2 element/wayland: Add blur background-effect 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
e4c0716951 element: Refactor element acquisition to be push based 2026-07-09 18:08:01 +02:00
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
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
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
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
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
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
Hojjat Abdollahi
28ef6bdbc8
feat: support multiple fullscreen windows per workspace 2026-06-02 17:48:33 +02:00
Niklas Herder
28258e5a5f cursor: Add idle-hide timeout
Adds a cursor_hide_timeout config key (Option<u32> seconds) to
CosmicCompConfig. When set, the cursor is hidden after the configured
period of pointer inactivity and revealed again by any pointer event.
Touch input does not count as activity (no visible cursor to surface).

Implementation:
- Per-seat hidden flag, calloop timer token, and last-armed Instant on
  CursorStateInner.
- notify_cursor_activity called from each pointer-related input branch
  (motion, button, axis, tablet) resets the flag and reschedules the
  timer; rapid successive calls are coalesced behind a 100ms throttle
  so high-frequency mice don't churn the calloop timer source.
- On timer fire, the hidden flag is set, draw_cursor short-circuits to
  an empty element list, and a render is scheduled. Active pointer
  grabs (drags, resizes) suppress the hide.
- Config reload arms or cancels the timer immediately; None as the
  configured value collapses the cancel path into the same function.

Closes #2231.

Drafted with Claude (Anthropic); reviewed and tested by the committer.
2026-05-22 14:14:17 +02:00
Victoria Brekenfeld
61e677e39f kms: Try to re-open the device on permission errors after resume 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
23b198f30b kms: Fix surface drop_and_join 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
b5a1a6d317 kms: Recreate graphics contexts on resume 2026-05-05 14:44:13 -06:00