Commit graph

2015 commits

Author SHA1 Message Date
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
Ian Douglas Scott
f91115fb45 Replace privileged field with a not_sandboxed() method
`privileged` now only indicates if a client is "sandboxed", i.e. it has
a security context, where the sandbox engine isn't cosmic-panel.

So replace the field with a method that's a bit more descriptive.
2025-10-30 00:45:13 +01:00
Ian Douglas Scott
1bea97d42a Don't check for privileged for creator of security context
This is redundant since unprivileged clients can't create security
contexts.

If we expose this protocol, trust `sandbox_engine`, etc. to be correct.
2025-10-30 00:45:13 +01:00
Ian Douglas Scott
5c40d8b035 Remove COSMIC_ENABLE_WAYLAND_SECURITY env var
Do not attempt to secure protocols from non-sandboxed clients.
2025-10-30 00:45:13 +01:00
Ian Douglas Scott
b25b3041cd session: Remove NewPrivilegedClient command
https://github.com/pop-os/cosmic-session/pull/154 removes the use of
this command.
2025-10-30 00:45:13 +01:00
Hosted Weblate
0816b870fe i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Sachin Chaudhary <chaudharysachinasachin@gmail.com>
Co-authored-by: lorduskordus <lorduskordus@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/cs/
Translation: Pop OS/COSMIC Comp
2025-10-29 12:15:16 +01:00
Yureka
ab509dd88e Add example for customized window decorations
Signed-off-by: Yureka <yuka@yuka.dev>
2025-10-29 11:27:14 +01:00
Yureka
a74b6e3a9b Add hooks for custom window decorations
This is a first use of the new hooks system, which allows customizing
cosmic-comp at compile-time.
In this case, the view() function of CosmicWindow / CosmicStack is
hooked and the hook can change what is rendered as the header bar.

Signed-off-by: Yureka <yuka@yuka.dev>
2025-10-29 11:27:14 +01:00
Yureka
d6e11de1f1 expose cosmic_comp as a library
Allows other programs to depend on the cosmic_comp library crate and
start a cosmic-comp in their process by calling `cosmic_comp::run()`.
Later, customization parameters can be added to `run()`.
Note that the interface of the cosmic_comp library crate is not stable
in any way and might change anytime.

Signed-off-by: Yureka <yuka@yuka.dev>
2025-10-29 11:27:14 +01:00
Vukašin Vojinović
5a2eca29c3 chore: unused dependencies
Removes `bytemuck` and `smallvec`.
2025-10-22 23:55:11 +02:00
Vukašin Vojinović
586a16f17f chore: update CI 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
1f7f0c70b7 chore: format for Rust 2024 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
0a8da05847 fix(kms): early exit when iterating over crts
Clippy noted that this loop doesn't actually loop, so maybe this fixes some issues.
2025-10-22 23:55:11 +02:00
Vukašin Vojinović
b6c5d00bec cargo fmt 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
5e9ea93819 chore: manual clippy 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
0847247c33 chore: clippy 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
3b70bc0265 chore: update dependencies 2025-10-22 23:55:11 +02:00
Jeremy Soller
23db1b9ec3 Use automatic shared library dependency on libdisplay-info 2025-10-21 08:50:17 -06:00
Hosted Weblate
856a8bf98c i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Stepan Denysenko <stepden04@gmail.com>
Co-authored-by: Yelysei <yelysei.matviienko@proton.me>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/uk/
Translation: Pop OS/COSMIC Comp
2025-10-21 13:42:43 +02:00
Ian Douglas Scott
cbab016cee Call dbus::ready even when systemd is enabled
The Gentoo overlap packaged needed this to get socket activation working
properly (https://github.com/fsvm88/cosmic-overlay/pull/88).

For some reason I didn't seem to need this testing socket activation on
Pop!_OS? Unless someone knows exactly why or has a better idea, for now
apply this change along with the socket activation change in
https://github.com/pop-os/xdg-desktop-portal-cosmic/pull/176.
2025-10-17 11:58:37 -07:00
Weblate (bot)
bead74f023
i18n: translation updates from weblate (#1744)
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/uk/
Translation: Pop OS/COSMIC Comp

Co-authored-by: Stepan Denysenko <stepden04@gmail.com>
Co-authored-by: Yelysei <yelysei.matviienko@proton.me>
2025-10-16 14:59:42 +02:00
Weblate (bot)
de32b0cb81
i18n: translation updates from weblate (#1738) 2025-10-15 14:45:19 +02:00
Hosted Weblate
fd88540def i18n: translation updates from weblate
Co-authored-by: Aleksandar Anžel <44969003+AAnzel@users.noreply.github.com>
Co-authored-by: Mikenu Takeru <mikenu-jp@users.noreply.hosted.weblate.org>
Co-authored-by: sicKat <giuseppecatillo2003@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/de/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/fa/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/it/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ro/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/sk/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/sr_Cyrl/
Translation: Pop OS/COSMIC Comp
2025-10-14 15:32:38 +02:00
Hosted Weblate
d854eeb439 i18n: translation updates from weblate
Co-authored-by: Ziad El-sayed <ziadelsayed1797@tutamail.com>
Co-authored-by: twlvnn kraftwerk <kraft_werk@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ar/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/bg/
Translation: Pop OS/COSMIC Comp
2025-10-10 09:05:23 -06:00
Hosted Weblate
189d065220 i18n: translation updates from weblate
Co-authored-by: Guðmundur Erlingsson <gudmundure@gmail.com>
Co-authored-by: oddib <oddbjorn.mr@hotmail.no>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/is/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/nn/
Translation: Pop OS/COSMIC Comp
2025-10-09 07:11:18 +02:00
Hosted Weblate
de7a9d5667 i18n: translation updates from weblate
Co-authored-by: Fedorov Alexei <aleksejfedorov963@gmail.com>
Co-authored-by: Guðmundur Erlingsson <gudmundure@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Mattias Eriksson <snaggen@gmail.com>
Co-authored-by: Yago Raña Gayoso <yago.rana.gayoso@gmail.com>
Co-authored-by: mikenu <mikenu-jp@users.noreply.hosted.weblate.org>
Co-authored-by: oddib <oddbjorn.mr@hotmail.no>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/es/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ja/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ru/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/sv/
Translation: Pop OS/COSMIC Comp
2025-10-08 00:22:38 +02:00
therealmate
314a7367f7 chore: add Alt+F4 shortcut to close windows
Fixes https://github.com/pop-os/cosmic-comp/issues/1625
2025-10-07 17:06:43 +02:00
Hosted Weblate
67680cd701 i18n: translation updates from weblate
Co-authored-by: Fedorov Alexei <aleksejfedorov963@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Yago Raña Gayoso <yago.rana.gayoso@gmail.com>
Co-authored-by: mikenu <mikenu-jp@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/es/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ja/
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/ru/
Translation: Pop OS/COSMIC Comp
2025-10-07 17:06:03 +02:00
Ashley Wulber
3465ce7602 feat: corner radius for CosmicMapped 2025-10-03 20:11:16 +02:00
Ashley Wulber
228af1037a fix(corner-radius): error handling and cleanup 2025-10-03 20:11:16 +02:00
Ashley Wulber
bef8c53069 chore: cargo fmt 2025-10-03 20:11:16 +02:00
Ashley Wulber
be616e093f chore: cosmic-protocols patch 2025-10-03 20:11:16 +02:00
Ashley Wulber
2e3bb2d80e refactor(corner-radius): cleanup & add pre commit hooks 2025-10-03 20:11:16 +02:00
Ashley Wulber
819887e298 fix(corner-radius): post protocol errors 2025-10-03 20:11:16 +02:00