Commit graph

2227 commits

Author SHA1 Message Date
8ac198de15 kms: revient au mode prefere pour le choix initial de sortie
Revient sur 7187efd5, qui elisait le rafraichissement le plus eleve a la
resolution native au lieu du mode marque PREFERRED.

Sans effet au quotidien : ~/.local/state/cosmic-comp/outputs.ron memorise
le mode choisi par sortie et pin deja DP-1 en 3840x2160 a 119,88 Hz.
populate_modes ne decide qu'en l'absence d'etat memorise, c'est-a-dire sur
un profil neuf ou un ecran jamais vu.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 09:54:25 +02:00
be1fab51ea comp: retire le runtime Tokio, devenu sans objet
Revient sur 3d01a219. La feature "tokio" de libcosmic-yoda activait
zbus?/tokio, ce qui imposait un Handle::current() ambiant alors que la
boucle de cosmic-comp n'est pas async ; d'ou le garde de runtime dans
main(). La feature est retiree de la dependance libcosmic, zbus n'a donc
plus besoin de reacteur Tokio et le garde n'a plus lieu d'etre.

Cargo.lock perd tokio et toute la chaine qui venait avec la feature :
ashpd, rfd, atspi, accesskit_unix, zbus_xml, tokio-stream.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 09:54:17 +02:00
f60c573f4d Merge upstream/master (COSMIC 1.6) into local/yoda-main
32 commits amont, aucun conflit de code : seul le lockfile divergeait,
il est regenere. Les 9 commits yoda sont preserves, dont le patch des
onglets de piles suivant WindowControlsPosition.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:56:05 +02:00
b45d12edef stack tabs: follow WindowControlsPosition for the close button
The window stack tabs build their own Tab widget rather than using
libcosmic segmented_button, so they kept the close button on the right
even with macOS-style controls enabled.

Order the tab items from the configured position: close first when
Start, last when End, with the container alignment following.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 21:18:39 +02:00
Victoria Brekenfeld
314fc670a8
Merge pull request #2754 from weblate/weblate-pop-os-cosmic-comp
Translations update from Hosted Weblate
2026-08-18 13:26:18 +02:00
Hosted Weblate
f1d1c00257
i18n: translation updates from weblate
Co-authored-by: Michael Millet <mikevlet@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/da/
Translation: Pop OS/COSMIC Comp
2026-08-18 11:09:23 +02:00
Ian Douglas Scott
8806436f81 libei: Add com.system76.CosmicOSK to DBus whitelist 2026-08-17 12:22:35 -07:00
Ian Douglas Scott
861a460e6c chore: Fix clippy lints 2026-08-17 12:22:35 -07:00
Ian Douglas Scott
c423e82820 libei: on KMS, schedule render after handling input events
Matches behavior of libinput backend.
2026-08-17 12:22:35 -07: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
Ian Douglas Scott
e939a72b30 Initial Ei protocol support 2026-08-17 12:22:35 -07:00
Ian Douglas Scott
861b732671 input: Handle scroll events that only have amount_v120
X11, winit, and libei backends all can produce scroll events with
`amount_v120()` but no `amount()`.
2026-08-17 12:22:35 -07:00
Ian Douglas Scott
18ae082615 Update smithay with tablet API changes
For now, only `WlSurface` receives tablet focus, as was previously the
case.

Also updates `reis` to latest bugfix release.
2026-08-17 12:22:35 -07:00
Victoria Brekenfeld
0cf70521ff
Merge pull request #2751 from weblate/weblate-pop-os-cosmic-comp
Translations update from Hosted Weblate
2026-08-17 12:51:34 +02:00
Hosted Weblate
6af1dba69b
i18n: translation updates from weblate
Co-authored-by: Michael Millet <mikevlet@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/da/
Translation: Pop OS/COSMIC Comp
2026-08-17 08:51:26 +02:00
Victoria Brekenfeld
f97a852e95
Merge pull request #2735 from weblate/weblate-pop-os-cosmic-comp
Translations update from Hosted Weblate
2026-08-14 15:57:29 +02:00
Victoria Brekenfeld
3b8bac8335
Merge pull request #2683 from hojjatabdollahi/hojjat/fix-chrome
fix(shell): take presentation feedback from fullscreen surfaces
2026-08-14 15:36:28 +02:00
Hosted Weblate
abfb25a672
i18n: translation updates from weblate
Co-authored-by: Michael Millet <mikevlet@protonmail.com>
Co-authored-by: Steen Rabol <steen@rabol.dev>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/da/
Translation: Pop OS/COSMIC Comp
2026-08-14 08:51:32 +02:00
Victoria Brekenfeld
647228b9ce
Merge pull request #2700 from weblate/weblate-pop-os-cosmic-comp
Translations update from Hosted Weblate
2026-08-10 15:54:16 +02:00
Hosted Weblate
f89c78b9bd
i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Martin Meizoso <martinmeizoso@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/gl/
Translation: Pop OS/COSMIC Comp
2026-08-05 16:02:35 +02:00
Hojjat
58c018dd40 fix(shell): take presentation feedback from fullscreen surfaces 2026-07-31 13:42:00 -06:00
Victoria Brekenfeld
d3ffa81494
Merge pull request #2671 from weblate/weblate-pop-os-cosmic-comp 2026-07-30 15:43:15 +02:00
Hosted Weblate
789e0b3634
i18n: translation updates from weblate
Co-authored-by: Andi Chandler <andi@gowling.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/en_GB/
Translation: Pop OS/COSMIC Comp
2026-07-30 11:03:25 +00:00
Victoria Brekenfeld
091583ac84 backend: Support wl-dmabuf v6 2026-07-29 22:08:23 +02:00
Victoria Brekenfeld
81cd5fdbaa
Merge pull request #2667 from weblate/weblate-pop-os-cosmic-comp 2026-07-29 17:14:04 +02:00
Hosted Weblate
d687285338
i18n: translation updates from weblate
Co-authored-by: Andi Chandler <andi@gowling.com>
Co-authored-by: Davide <davidemadonna@outlook.it>
Co-authored-by: Sproston <ojspr2007@gmail.com>
Co-authored-by: Wilbur Lindqvist <william@willmantrade.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/en_GB/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/it/
Translation: Pop OS/COSMIC Comp
2026-07-29 11:01:49 +02:00
zyads
ffeda3375a fix(corner_radius): check LayerHookId for layer surfaces
GetCornerRadiusLayer looked up the existing hook via ToplevelHookId while
inserting into LayerHookId a few lines later. Both are
Mutex<Option<(HookId, Weak<..>)>> so it compiles, but they are distinct
data_map slots: the "does this surface already have a corner-radius object?"
check for a layer surface read the toplevel slot, so it could not see a layer
object that was already there, and it created a toplevel entry on a layer
surface as a side effect.

Every other read of the layer hook already uses LayerHookId.

Disclosure: found and written with AI assistance (Claude). The change is the
one line quoted above; I understand it and verified the tree builds with it.
2026-07-29 00:30:01 +02:00
Hojjat
8d450d4977 fix: clamp pointer edge after applying the output offset 2026-07-29 00:27: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
RipleyTom
5ce21fb4f3 fix: ensure X window focus on unmap/map 2026-07-27 21:38:26 +02:00
7187efd58f feat: prefer highest refresh rate at native resolution
populate_modes() now selects the mode with the highest refresh rate at
the preferred (native) resolution instead of blindly using the EDID
PREFERRED flag. This ensures high-refresh panels (120 Hz, 144 Hz, …)
are used out-of-the-box, including in the greeter session.

Also fix libcosmic → libcosmic-yoda package reference.
2026-07-25 16:15:30 +02:00
Tom Grushka
44de3063ee dbus: Fix deadlock in a11y keyboard monitor
A11yKeyboardMonitorState::key_event calls self.has_key_grab() inside
self.clients guard loop.

A "well-behaved" a11y client calls `WatchKeyboard` before `SetKeyGrabs`.

If WatchKeyboard is not called first, the `!client.watched` guard does
not short-circuit, so `has_key_grab()` runs and locks `self.clients` again.

This causes a deadlock and the compositor freezes, requiring a hard reboot.

This commit moves the `self.has_key_grab()` before the guard to
prevent a double lock.
2026-07-25 01:14:20 +02:00
RipleyTom
6108cef8b3 fix: workaround for Chromium apps breaking below 1.0 scaling 2026-07-25 01:13:59 +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
Timo Strunk
53a8d0bea2 fix(kms): join surface threads before exit to avoid SIGABRT on shutdown
When the kiosk child exits, calling process::exit() directly from the calloop
callback runs libc's atexit handlers (Mesa's util_queue_kill_threads) while a
KMS surface thread may still be mid-frame in eglCreateSync(). Concurrent Mesa
teardown and live EGL use corrupt the heap and glibc aborts the process
("free(): corrupted unsorted chunks", SIGABRT).

Stop the event loop cleanly via should_stop instead, stashing the child's exit
code in Common::kiosk_exit_code. After the loop returns, pause() each DRM device
(releasing master so the surface drop path skips its blocking clear_state(), and
the incoming compositor gets master immediately), then drop_and_join() every
surface so no thread is left in Mesa. Only then is process::exit() called, at
which point atexit is safe to run.

The join is done here rather than in Surface::Drop because an unconditional join
in Drop deadlocks against apply_config_for_outputs during normal operation; once
the event loop has stopped, the surface thread can process ThreadCommand::End
and exit without the main thread servicing any pending message.

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
Victoria Brekenfeld
9718699ec7
Merge pull request #2619 from weblate/weblate-pop-os-cosmic-comp
Translations update from Hosted Weblate
2026-07-23 19:04:37 +02:00
Hosted Weblate
e4bb42f2c0
i18n: translation updates from weblate
Co-authored-by: Prasanta-Hembram <Prasantahembram720@gmail.com>
2026-07-23 18:49:35 +02:00
d1849f639b fix: resolve rebase conflicts and fix package name 2026-07-22 15:21:58 +02:00
e6173b93ca chore: restore rust-toolchain 1.93 + refresh lockfile post-rebase
Leyoda 2026 – GPLv3
2026-07-22 15:02:35 +02:00
ba1232cffc fix: absorb libcosmic theme-v2 API (private containers, text::Style, wgpu 28)
Leyoda 2026 – GPLv3
2026-07-22 15:02:24 +02:00
4fa39e5ea3 chore: use local cosmic-text checkout 2026-07-22 15:00:14 +02:00
bbf7effda2 yoda: refresh local dbus binding lock 2026-07-22 14:59:51 +02:00
3d01a21900 fix: keep tokio runtime available for compositor 2026-07-22 14:59:37 +02:00
3e87e769a7 chore: align compositor with local cosmic stack 2026-07-22 14:59:37 +02:00
Ashley Wulber
4d370cdf92 fix: no ceil for scaled outline thickness 2026-07-21 22:22:07 +02:00
littlezabi
1d72227a30 fix: release active popup grabs on toplevel destruction
If a window with an active popup grab is closed or crashes unexpectedly, the input grab state can get stuck, freezing keyboard and mouse clicks.
    This patch iterates over all seats and releases the active seat grab if it is owned by the destroyed window or one of its child popups.

Signed-off-by: littlezabi <zohaibjozvi@gmail.com>
2026-07-21 18:04:33 +02:00
Ian Douglas Scott
d7d6be3cdb image-copy: Only embed cursor in toplevel capture if focused 2026-07-21 17:02:58 +02:00
Ian Douglas Scott
270ba7bf80 image-copy: Update toplevel cursor position for cursor_follows_focus 2026-07-21 17:02:58 +02:00
Ian Douglas Scott
6c6b56a7f3 input: Deduplicate into update_output_image_copy_cursor_position 2026-07-21 17:02:58 +02:00
Ian Douglas Scott
dda2d14832 input: Send wl_pointer.motion on warp, and applying constraint hint
Gnome seems to send `motion` in these cases. The spec isn't 100%
explicit, but it seems `motion` events are needed for the client to have
the same understanding of where the pointer is as the compositor, which
generally seems to be desired.

This is also needed for toplevel cursor image-copy to get the position
change. Likewise, we want image-copy to have the same understanding of
where the cursor is as the compositor and client.
2026-07-21 17:02:58 +02:00