Commit graph

2048 commits

Author SHA1 Message Date
Victoria Brekenfeld
df88a0e181 chore: smithay update 2025-12-09 17:03:19 +01:00
Hosted Weblate
add06102ad i18n: translation updates from weblate
Co-authored-by: jonnysemon <jonnysemon@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ar/
Translation: Pop OS/COSMIC Comp
2025-12-09 16:07:25 +01:00
Ian Douglas Scott
cf55b6c899 xwayland: Handle _NET_ACTIVE_WINDOW client messages
Allow X11 clients to activate a window.

This shares the logic with xdg-activation. It might make sense to handle
the urgent hint on an X11 Window natively, but for now this just marks a
workspace as urgent on activation in the same way xdg-activation does.
2025-12-08 20:36:54 +01:00
Victoria Brekenfeld
8fc7f0809f chore: smithay update 2025-12-08 18:01:29 +01:00
Victoria Brekenfeld
6288789842 kms: Only pause device after all surfaces are successfully suspended 2025-12-04 22:29:39 +01:00
Victoria Brekenfeld
7c3e18b588 surface: Don't crash due to weird state after resume 2025-12-04 22:29:39 +01:00
Victoria Brekenfeld
77d3605fb9 Update smithay for DnD updates 2025-12-04 20:17:12 +01:00
Hosted Weblate
3ddc9421e4 i18n: translation updates from weblate
Co-authored-by: CYAXXX <cyaxxx@users.noreply.hosted.weblate.org>
2025-12-03 16:18:20 +01:00
Victoria Brekenfeld
123add9dee shell: Add DelayGrab for client initiated move requests 2025-12-03 11:46:31 +01:00
Jacob Kauffmann
25904ca189 fix: Add second touchpad hotkey config for Pangolin keyboards 2025-12-03 11:46:23 +01:00
Hendrik Hamerlinck
714e80366d fix: properly remove elements from the focus_stack
shift_remove could not delete the element in it's stack because
indexmap::Equivalent requires the hashes to be equivalent
2025-12-02 07:04:09 -08:00
Ian Douglas Scott
6025f483d6 input: Clear modifier_queue on a11y grab
This might be needed if a grab included `super`.
2025-11-24 13:53:05 -08:00
Ian Douglas Scott
1c35339076 input: Use suppresssed_keys() for a11y grabs
This mostly seems to behave the same way, but presumably we want a key
release to be treated as grabbed if and only if the press had been.
2025-11-24 13:53:05 -08:00
Ian Douglas Scott
a3904af03c wayland: Remove atspi protocol
If we want to use the `org.freedesktop.a11y.KeyboardMonitor` protocol on
Pop!_OS, there is no need to support the Cosmic-specific protocol that
requires an `at-spi2-core` patch.
2025-11-24 13:53:05 -08:00
Ian Douglas Scott
f065143d3e dbus: Implement org.freedesktop.a11y.Manager protocol
This protocol is now the upstream solution in at-spi2-core/orca for
registering keyboard grabs and watching key events. It should also be a
bit better than the current verious of our custom Wayland protocol for
this purpose.

Like Mutter and Kwin, we currently restrict this to only be called by
the client that holds the name `org.gnome.Orca.KeyboardMonitor` on the
session bus. We also send the `KeyEvent` signal only to registered
watchers, rather than broadcasting, as DBus does by default.
2025-11-24 13:53:05 -08:00
Ian Douglas Scott
d08ac9645b dbus: Add NameOwners helper
This monitors `NameOwnerChanged` events to keep track of what unique
names own what well-known names on the bus. This allows dbus protocol
implementations to check that callers own a certain name.

To initially populate the list of dbus name owners, `ListNames` is used
at start. Then `GetNameOwner` is lazily invoked to populate owners that
exist at start. To avoid calling that for every single name on the bus.

This also keeps track of unique bus names, which don't require any
additional methods or signals to monitor. This allows us to also detect
if a client has disappeared from the bus.

The `COSMIC_ENFORCE_DBUS_OWNERS` allows disabling checking of owned
names.
2025-11-24 13:53:05 -08:00
Ian Douglas Scott
55401b1e53 dbus: Use ThreadPool instead of zbus blocking API
The `zbus` blocking API just wraps the async API with `block_on`, so we
may as well use our own executor.
2025-11-24 13:53:05 -08:00
Ian Douglas Scott
8455869439 Add a ThreadPool async executor to State
If we need to use simple async code in a few places, a single executor
may be better than having several threads blocking on async code.

This should probably use the calloop executor, but that's had issues in
cosmic-workspaces, though that may not apply here.
2025-11-24 13:53:05 -08:00
Hosted Weblate
f0bab4a40b i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: jonnysemon <jonnysemon@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ar/
Translation: Pop OS/COSMIC Comp
2025-11-24 17:55:58 +01:00
Hosted Weblate
ed3efe3d29 i18n: translation updates from weblate
Co-authored-by: jonnysemon <jonnysemon@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ar/
Translation: Pop OS/COSMIC Comp
2025-11-24 12:10:28 +01:00
Victoria Brekenfeld
8624928052 gestures: Cycle through workspaces 2025-11-21 09:10:01 -07:00
Victoria Brekenfeld
1f2863fa18 xwayland: Fix unscaled dpi setting 2025-11-21 09:09:21 -07:00
Hosted Weblate
b9d7870f71 i18n: translation updates from weblate
Co-authored-by: jonnysemon <jonnysemon@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ar/
Translation: Pop OS/COSMIC Comp
2025-11-21 16:58:29 +01:00
Ian Douglas Scott
282d76ef34 Set X11Surface hidden when a surface is minimized
This seems for an SDL XWayland client to restore fullscreen after
unminimize, it needs to see the `_NET_WM_STATE_HIDDEN` state get set
and unset.

In general `_NET_WM_STATE_HIDDEN` does not seem to cover all the
cases covered by waylands "suspended" state, so let's not equate them.

https://github.com/pop-os/cosmic-comp/issues/1510
2025-11-18 22:26:04 +01:00
Hosted Weblate
1f9c130410 i18n: translation updates from weblate
Co-authored-by: ANTOINE Daniel <univac55@gmail.com>
Co-authored-by: Aisyk <aisyko@gmail.com>
Co-authored-by: Feike Donia <feikedonia@proton.me>
Co-authored-by: GerardWassink <gerard.wassink@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Julien Brouillard <julienbrouillard1@gmail.com>
Co-authored-by: twlvnn kraftwerk <kraft_werk@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/bg/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/fr/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/nl/
Translation: Pop OS/COSMIC Comp
2025-11-18 13:01:45 +01:00
Hosted Weblate
83ee2a6953 i18n: translation updates from weblate
Co-authored-by: ANTOINE Daniel <univac55@gmail.com>
Co-authored-by: Aisyk <aisyko@gmail.com>
Co-authored-by: Feike Donia <feikedonia@proton.me>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Julien Brouillard <julienbrouillard1@gmail.com>
Co-authored-by: twlvnn kraftwerk <kraft_werk@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/bg/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/fr/
Translation: Pop OS/COSMIC Comp
2025-11-17 12:10:26 +01:00
Victoria Brekenfeld
1c74adf772 chore: smithay update 2025-11-14 09:14:22 +01:00
Ashley Wulber
04d3e1ed59 fix(popup): avoid panic when None
cosmic-comp panics here after launching an app from the app tray overflow popup. While it may indicate a panel issue that I also need to look into, it seems to work fine if we don't unwrap on this option.
2025-11-13 17:58:37 -05:00
Victoria Brekenfeld
84f1d6b7a9 shell: Change fullscreen restore info on move 2025-11-13 09:33:50 -07:00
Victoria Brekenfeld
c1e5a3ee3d shell: Tile windows moved to a tiled workspace 2025-11-13 09:33:50 -07:00
Victoria Brekenfeld
7e63b99cd5 shell: Moved minimized windows should stay minimized 2025-11-11 20:20:54 -07:00
Victoria Brekenfeld
5fc5a223c7 shell: Remove minimized state on unmap 2025-11-11 20:20:54 -07:00
Victoria Brekenfeld
41d0cd8d2b layout/tiling: Fix crash swapping across workspaces 2025-11-11 20:20:04 -07:00
Victoria Brekenfeld
e5ea486ea0 shell/stack: Don't reset previous_keyboard on noop set_active call 2025-11-11 20:18:58 -07:00
Peter Krull
6c01631f51 cargo fmt 2025-11-11 20:12:22 -07:00
Peter Krull
fc9fe59ed9 Fix bars when full screen, reposition popups 2025-11-11 20:12:22 -07:00
Ian Douglas Scott
e129094bfb Update smithay
Updates for `last_acked`, etc. API changes in
https://github.com/Smithay/smithay/pull/1817.

Includes layer shell fixes
from https://github.com/Smithay/smithay/pull/1819.
2025-11-11 21:27:57 +01:00
Ian Douglas Scott
9816b18259 Define a with_toplevel_state, generic over pending bool
Reduces a bit of duplication.
2025-11-11 21:27:57 +01:00
Hosted Weblate
25763439db i18n: translation updates from weblate
Co-authored-by: twlvnn kraftwerk <kraft_werk@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/bg/
Translation: Pop OS/COSMIC Comp
2025-11-10 12:24:46 +01:00
Ashley Wulber
e55d16b87b fix: unset grab if focusing exclusive layer shell surface 2025-11-05 15:49:22 +01:00
Ian Douglas Scott
7fd033295f focus-stack: Keep dragged surface in focus stack in move_request()
Replacement for https://github.com/pop-os/cosmic-comp/pull/1687, that
works correctly with multiple outputs.

We don't want another window to show a focus indicator while a window is
being dragged, so keep the window in the focus stack. If a window is
being moved out of a stack, change the focus from the stack to the
window.

`refresh_focus_stack()` doesn't seem to be called here, but for good
measure, make sure that calling that function also won't remove a
`CosmicMapped` from the focus stack if it is currently part of a move
grab for the seat.
2025-11-04 15:41:08 -08:00
Ian Douglas Scott
e09fcec9f3 Use keyboard focus target rather than focus_stack in keybindings
`Action::Close` already used the keyboard focus target, but some other
bindings didn't. Presumably it's most intuitive if all "current window"
key bindings affect the window with keyboard focus.

These used the focus stack on the `focused_output()` (the one with
keyboard focus), so I guess the main impact is when the keyboard target
is a window being dragged? Then the binding will operate on that window,
or have no effect.

This seems related to some of the behaviors discussed in
https://github.com/pop-os/cosmic-comp/issues/453.
2025-11-04 15:41:08 -08:00
Ian Douglas Scott
12857672f6 Use shift_remove() instead of retain() in unmap_element() 2025-11-04 15:41:08 -08:00
Ian Douglas Scott
f230a23bd0 focus-stack: Use IndexSet::shift_remove() for remove
This seems like the correct way to use an `IndexSet`. It shouldn't be
possible to have multiple entries that match, since it's a "set".

We can't define `Borrow<CosmicMapped> for FocusTarget`, so the blanket
impl of `indexmap::Equivalent` won't work, but implementing seems fine.
2025-11-04 15:41:08 -08:00
Ian Douglas Scott
505e36dcda Make CosmicWindowInternal/CosmicStackInternal not Clone
`IcedElement` uses `Arc` internally (and compares with `Arc::ptr_eq`).
So these structs are never cloned, and probably shouldn't be.
2025-11-04 15:41:08 -08:00
Hosted Weblate
6e4164643e i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Torsten <keulehoschi@gmail.com>
Co-authored-by: Yelysei <yelysei.matviienko@proton.me>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/de/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/uk/
Translation: Pop OS/COSMIC Comp
2025-10-31 16:14:45 +01:00
Hosted Weblate
3084d4f605 i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Torsten <keulehoschi@gmail.com>
Co-authored-by: Yelysei <yelysei.matviienko@proton.me>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/de/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/uk/
Translation: Pop OS/COSMIC Comp
2025-10-31 13:23:59 +01:00
Ian Douglas Scott
e814eebcc0 Add ext-data-control-v1 protocol
This is identical to the wlr protocol, and Smithay has implementations
for both.

New clients should use the `ext` protocol where present. Not sure how
widely used it is yet, but we probably should have both for now.
2025-10-30 00:45:13 +01:00
Ian Douglas Scott
d2d7c655ac Expose wlr-data-control-unstable-v1 to non-sandboxed clients
Some users have complained about not supporting clipboard managers. But
this was possible, but hidden under the `COSMIC_DATA_CONTROL_ENABLED`
env var.

Since the security context protocol exists now to provide a way to not
expose a protocol like this to sandboxed clients, it should be safe to
expose this now.
2025-10-30 00:45:13 +01:00
Ian Douglas Scott
f82db23f4a Restrict atspi protocol to only clients without security context
This is only intended to be used by `orca`.

I guess `|_| true` was a placeholder for a potentially more restrictive
check, but use this for now, anyway.
2025-10-30 00:45:13 +01:00