Commit graph

1526 commits

Author SHA1 Message Date
Victoria Brekenfeld
cbc4ad6fc2 xwayland: Allow eavesdropping on certain keyboard/pointer events 2025-04-02 17:26:09 +02:00
Victoria Brekenfeld
23f51eb150 chore: Update smithay 2025-04-02 17:26:09 +02:00
Victoria Brekenfeld
8d733a1245 xwayland: Always allow writing into clipboard
Overriding contents is no security issue and this is necessary for a
bunch of apps to work correctly.
2025-04-02 17:26:09 +02:00
Victoria Brekenfeld
2e2ca3eda0 xwayland: Allow pasting into fullscreen surfaces 2025-04-02 17:26:09 +02:00
Ian Douglas Scott
0c95871bd0 shell/workspace: Disambiguate output with edid match by connector name
If two displays have the same edid (which shouldn't happen, since edid
includes a serial number, but is somewhat common in practice with
identical monitors), match output stack by comparing both edid and
connector name.

If we get the same edid but a different connector, `set_output`
truncates but also adds the new one. (Before adding edid matching, this
would have just added to the output stack.)

`prefers_output()` will requrire a connector name match if the edid of
the current output is the same as that of the output being compared.
2025-04-02 13:40:56 +02:00
Ian Douglas Scott
70ed075e80 shell/workspace: Store edid in output stack
Matches by edid where present, or by connector name if there is no edid
information.
2025-04-02 13:40:56 +02:00
Ian Douglas Scott
75aab6e282 shell/workspace: Clear output stack when moved user moves workspace
If the user explicitly moves a workspace to an output, assume that is
where the user wants it, so it shouldn't be moved back to a different
output in the future.

For persistent workspaces, the explicitly set workspace is the one that
will be stored, instead of trying to track an unbounded list of outputs
persistently.
2025-04-02 13:40:56 +02:00
Ian Douglas Scott
e74eafce2c Add EdidProduct, as user data for kms Outputs
This is the same as `libdisplay_info::edid::VendorProduct`, but with
implementations for `Serialize`, `Eq`, etc.
2025-04-02 13:40:56 +02:00
Ian Douglas Scott
2fe5897db0 Replace screencopy with ext-image-copy-capture-v1 2025-04-01 18:22:42 +02:00
Carter Wobbe
fec4b3c235 config: Refactor WorkspaceLayout to use the Default macro 2025-03-31 18:23:13 +02:00
Hugo
2b8a3f7894 Argument support with clap_lex 2025-03-31 18:16:31 +02:00
Kamil Lihan
956734aa62 i18n(sk): Add Slovak translations 2025-03-31 17:55:28 +02:00
Victoria Brekenfeld
c072538a6e a11y/zoom: Fix settings page 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
a0648a3a53 input: Don't trigger modifier shortcuts, when zooming 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
ec60933e01 a11y/zoom: Add more leeway for OnEdge movement 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
0ba0a0cdaa a11y/zoom: zoom level per output 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
babb96ddfa a11y/zoom: Drop last state 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
83a7926748 a11y/zoom: Allow disabling scroll-shortcuts 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
b62e47ef8d a11y/zoom: Allow hiding the overlay 2025-03-28 18:35:06 +01:00
Victoria Brekenfeld
b0d0bfb034 xdg-activation/toplevel-management: Unmaximize when activating a tiled window 2025-03-27 11:57:17 +01:00
Victoria Brekenfeld
d46ed304b8 shell: Unmaximize when moving a single window to another tiling layer 2025-03-27 11:57:17 +01:00
Victoria Brekenfeld
5cef49d2ce shell: Unmaximize windows on the target workspace when moving groups 2025-03-27 11:57:17 +01:00
Victoria Brekenfeld
9ee701ee64 shell: Don't move group to tiled layer of floating-only workspace 2025-03-27 11:57:17 +01:00
Victoria Brekenfeld
7a8577592d kms: Support screencopy cursor modes with active filters 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
7373b3f513 backend: Support screen filters in nested mode 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
63916410a0 chore: Update smithay 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
7929e25966 kms: Support screen filters 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
18335c6758 kms: Refactor out postprocessing helpers 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
a748ea885e wayland: Add support for cosmic-a11y version 2 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
fc43b25421 chore: Update cosmic-protocols 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
ea09334ff7 config: Add screen-filter configuration and persistent state 2025-03-24 19:10:52 +01:00
Victoria Brekenfeld
c10d400d70 screencopy: Remove unnecessary lifetime 2025-03-24 19:10:52 +01:00
Ian Douglas Scott
b52d84dbd3 Call underlying_storage of TextureRenderElement without mapping
This was mapping `UnderlyingStorage::Memory` to `None`. I don't see any
reason for this. Though this also shouldn't change behavior since
`TextureRenderElement` doesn't provide `underlying_storage` currently.
2025-03-24 19:10:52 +01:00
Clayton Craft
29a649541d kms.timings.presented: print debug msg when frame time is overflowing
Also see: #1062
2025-03-19 18:45:44 +01:00
Clayton Craft
8f40fc7a1b kms: protect against potential overflow of Duration when calculating avg frametime
Also see: https://github.com/Smithay/smithay/pull/1685

Fixes #1062

Co-authored-by: Victoria Brekenfeld <victoria@system76.com>
2025-03-19 18:45:44 +01:00
Ian Douglas Scott
dbd43d7582 shell: Refactor out common code for removing workspace from set 2025-03-17 12:00:17 -07:00
Ian Douglas Scott
bdd3e12ace Fixes for migrate_workspace
Previously, this was not updating the workspace indices on either the
old or new set, and left no workspace on the old set with `Active`
state. It also didn't add a workspace if the last workspace was removed.
2025-03-17 12:00:17 -07:00
Ian Douglas Scott
dd6df7b92a Refactor out duplicated workspace_set_idx loops
This isn't too bad, but it seems best to avoid the same enumerate loop
in multiple places.
2025-03-17 12:00:17 -07:00
Ian Douglas Scott
cee8ffd463 Send one-dimensional workspace coordinates, without output index
`ext_workspace_handle_v1::coordinates` defines the coordinate as
"an N-dimensional grid within a workspace group". So it is not
expected that the coordinates are unique between different groups, or
establish any geometry between different groups.

Whether we use one workspace per output or allow workspaces to span
outputs in the protocol, the whole workspace group is on the same set of
outputs. So I think this holds in any case.

I don't think we rely on this anywhere.
2025-03-17 12:00:17 -07:00
Ian Douglas Scott
8d6bd47bc4 Take slice instead of array in set_workspace_coordinates
As far as I can tell this is equivalent, and there's no particular
reason to use an array. Arrays of options for variable-length arrays are
awkward.
2025-03-17 12:00:17 -07:00
Ian Douglas Scott
7340e2beff Improve handling of XDG activation tokens in shell
Requires https://github.com/Smithay/smithay/pull/1676.

This changes two things:
* `Workspace::is_empty` no longer checks if there are activation tokens,
  but a separate `Workspace::can_auto_remove` checks if the workspace is
  empty and has no activation tokens.
  - When we add workspace pinning, that can also be checked there.
* `Workspace` no longer contains a `pending_tokens` list that is updated
  on `refresh`. Instead, `can_auto_remove` takes the xdg activation
  state as an argument.

Since `Workspace::refresh` normally is run for focused workspaces, this
fixes allowing non-focused workspaces to be removed when an activation
token expires. It seems generally good to avoid tracking the activation
tokens in two places, and this is probably more efficient than needing
to refresh in more places.

By splitting this, we still don't remove an empty workspace if it has a
pending activation token, but we also don't add an empty workspace for
an activation token.

This mitigates the confusing behavior with activation tokens that aren't
used, but having to wait a few seconds in some cases before a workspace
is removed is still a little confusing. (We probably want `cosmic-term`
and `cosmic-workspace` to either consume the activation tokens they are
passed, or not be passed tokens when started by keybinding?)

Fixes https://github.com/pop-os/cosmic-comp/issues/1099.
2025-03-14 17:53:34 +01:00
Ian Douglas Scott
96cbaad7b7 Update smithay 2025-03-14 17:53:34 +01:00
Ian Douglas Scott
1387535252 Fix dependency_on_unit_never_type_fallback warning on latest Rustc
Apparently in Rust 2024, the inferred type here would be `!`, which
doesn't implement `Default`. Explicitly use `()` instead.

https://doc.rust-lang.org/nightly/edition-guide/rust-2024/never-type-fallback.html
2025-03-14 17:50:17 +01:00
Victoria Brekenfeld
c3f130e5bf chore: Update rust toolchain 2025-03-12 18:31:39 +01:00
Victoria Brekenfeld
0ed2841435 iced: Don't call update from render_elements 2025-03-12 16:59:05 +01:00
Victoria Brekenfeld
0f5ba624c5 iced: Don't throttle resizes 2025-03-12 16:59:05 +01:00
Victoria Brekenfeld
ea1800f157 input: Fix events for subsurfaces of lock surface 2025-03-12 16:55:22 +01:00
Peter Krull
ad2cba324e fix: Remove extra scaling of borders 2025-03-12 16:55:00 +01:00
Victoria Brekenfeld
95b27637ae chore: smithay update 2025-03-12 16:50:58 +01:00
Ian Douglas Scott
f8fae8a5b0 shell: On output_remove, focus moved workspace instead of empty one
On `output_remove`, if the output a workspace is moved to had no
non-empty workspaces (or did, but had an empty one active), the empty
workspace would remain active, and the workspace that was active on the
removed output is no longer visible.

Instead, change the active workspace to the one that was active on the
removed output.

This addresses another edge case where hotplug results in an empty
workspace, followed by other non-empty workspaces, and generally seems
like a better experience.

This could be further restricted by only applying if `new_set` is not on
the active output (to not mess with what the user is interacting with,
even it's an empty workspace) or only if the old `set` was the active
output, etc. But it seems good without further restriction.
2025-03-12 15:44:35 +01:00