Commit graph

2248 commits

Author SHA1 Message Date
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
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
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
Ian Douglas Scott
c92c18e09e Use Global coordinate instead of inferring as Logical
Inference behavior can be confusing, and the coordinate here is global,
so use `Global` like the `PointerMotion*` event handlers.
2026-07-21 17:02:58 +02:00
Ian Douglas Scott
2648aea0df image-copy: Move duplicate code to a cursor_capture_constraints()
This ensures we avoid advertising a `0,0` buffer size (which will
protocol error to actually allocate), and avoids defining the supported
formats for cursor capture buffers in a bunch of places.
2026-07-21 17:02:58 +02:00
Ian Douglas Scott
27956e6e00 Make cursor_geometry() return a CursorGeometry struct
A bit better than just a tuple.
2026-07-21 17:02:58 +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
Ian Douglas Scott
d84d5d46ce image-copy: Use seat from WlPointer instead of last_active() 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
RipleyTom
8955024bff Fix: improve edge pointer accuracy 2026-07-21 15:50:19 +02:00
RipleyTom
9789187416 fix: map_window_request should update pending state 2026-07-21 13:08:47 +02:00
Hojjat
aabf1cdc08 fix: flicker on wayland context menu pop up
fix
2026-07-21 12:59:20 +02:00
Victoria Brekenfeld
9b5a2a0f83 chore: Fix feature gate for logind 2026-07-20 17:28:15 +02:00
Vukašin Vojinović
d41124a51d chore: clippy fixes 2026-07-18 09:09:30 +02:00
Vukašin Vojinović
160bd39ba4 render: cgmath -> glam 2026-07-18 09:09:30 +02:00
Victoria Brekenfeld
2d95d46a37 chore: formatting fixes 2026-07-16 19:43:10 +02:00
Victoria Brekenfeld
8ab946f10a chore: clippy fixes 2026-07-16 19:43:10 +02:00
Alyssa Ross
9feaa865ab main: fix kiosk command with command line options
We were just running whatever was given on the command line as the
kiosk command, which meant that if --no-xwayland was given, we'd try
execing --no-xwayland.  Preserve the processed command line from the
option parser, and run only what's left over as the kiosk command to
fix this.
2026-07-15 22:56:25 +02:00
Alyssa Ross
2b360a8dd7 main: notify readiness on non-systemd systems
Other service supervisors implement systemd's readiness notification
protocol.  For example, s6 implements it with the
s6-notify-fd-from-socket[1] program.  libsystemd::daemon::notify
already checks for NOTIFY_SOCKET being set, which should be sufficient
to tell if systemd-style readiness notification is wanted.

Link: https://skarnet.org/software/s6/s6-notify-fd-from-socket.html [1]
2026-07-15 22:55:25 +02:00
Hojjat
2329cea5c9 fix: input to cropped tiled windows should be bound to the tile 2026-07-15 22:55:05 +02:00
Graham Walker
b8807a541f Fix detached active window hint 2026-07-15 13:16:28 -06:00
Ashley Wulber
8f82cade68 cleanup: remove attempts to force redraw
They seem to always fail anyways and it has no negative effect as far as I can tell
2026-07-15 14:48:33 -04:00
Victoria Brekenfeld
dec1ee8633 fixup: logic error 2026-07-14 18:16:50 -04:00
Victoria Brekenfeld
603c90b103 element/surface: Avoid scanning out translucent surfaces 2026-07-14 18:16:50 -04:00
Erik
7ee78d9c13 Forward axis relative direction to Wayland clients.
Libinput reports natural scrolling via AxisRelativeDirection. Qt sets
QWheelEvent::inverted() from wl_pointer.axis_relative_direction. COSMIC
was forwarding axis values but not the direction hint.

Tested on Fedora 44 COSMIC Wayland with Telegram Desktop (native Wayland),
natural scrolling enabled — horizontal touchpad swipes fixed.

Assisted-by: AI (root-cause analysis)

Signed-off-by: Erik <erik-balfe@users.noreply.github.com>
2026-07-13 21:19:27 +02:00
Victoria Brekenfeld
a69d8d2dba
Merge pull request #2490 from weblate/weblate-pop-os-cosmic-comp
Translations update from Hosted Weblate
2026-07-13 17:25:19 +02:00
Ilia Malanin
7a7c6b7fd4 fix: take into account pending maximized state when recalculating window geometry 2026-07-13 17:24:56 +02:00
Victoria Brekenfeld
80a440fcb0
Merge branch 'master' into weblate-pop-os-cosmic-comp 2026-07-13 17:19:34 +02:00
Tom Grushka
0596cce40d remove redundant level condition; simplify level early return on ZoomMovement::Centered 2026-07-13 13:08:45 +02:00
Tom Grushka
4d14f5568f improve comments 2026-07-13 13:08:45 +02:00
Tom Grushka
01c0cb020e fix: a11y: magnifier: correct Centered/OnEdge focal-point math and refresh focal point at zoom-in
- I used AI to assist in research of the focal point computation formulae for OnEdge and Centered modes.
- I used the formulas found in [KDE's zoom magnifier](https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/zoom/zoom.cpp) and converted them to Rust and the COSMIC focal point system.

- Remove unnecessary focal-point precomputation in `OutputZoomState::new`, because it is now updated on first zoom in anyway.

- Do focal point computation in Local coordinates in update_focal_point to eliminate local-global conversion confusion/ issues.

- ZoomMovement::OnEdge - single code path rewrite - old two-branch logic caused jumping and unpredictability at high zoom. Fixes [#2683](https://github.com/pop-os/cosmic-epoch/issues/2683), partially addresses [#2688](https://github.com/pop-os/cosmic-epoch/issues/2688).

- ZoomMovement::Centered - translation/clamp/invert - prevents "blow up" of calculation at zoom level > 2.0 that caused cursor to disappear off bottom right of screen. Fixes [#1503](https://github.com/pop-os/cosmic-comp/issues/1503).

- `is_level_change` - sets `previous_point` so that `animating_focal_point` interpolates instead of jumping. Still room for improvement (needs focal point recomputation per-frame during animation to prevent "boomerang" feel), but this is still an improvement over jumping.

- In `trigger_zoom`, call `update_focal_point` when `level > 1.0` - overlaps proposal in [#1859](https://github.com/pop-os/cosmic-comp/pull/1859) + the level gate to prevent stale focal point on zoom in. Fixes [#2511](https://github.com/pop-os/cosmic-comp/issues/2511) and [#1883](https://github.com/pop-os/cosmic-epoch/issues/1883). Partially addresses [#1420](https://github.com/pop-os/cosmic-comp/issues/1420) (item 1 only).
2026-07-13 13:08:45 +02:00
Victoria Brekenfeld
693d1ad775 shell/window: Fix radii for server-side decorations 2026-07-09 18:08:01 +02:00