Commit graph

1422 commits

Author SHA1 Message Date
Victoria Brekenfeld
61d44b3a9d utils: Move NextDown 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
55d1ce5e3b config: Add zoom configuration 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
c01de20b2b shell: Allow triggering zoom 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
2e2943d99c render: Scale contents according to zoom_level 2025-02-20 23:51:55 +01:00
Victoria Brekenfeld
8e73fdebc6 chore: Update libcosmic 2025-02-20 20:11:40 +01:00
Victoria Brekenfeld
a57a2163f6 floating: Fix resize indicator order 2025-02-20 20:11:40 +01:00
Paul Daniel Faria
288930c3fe Derive Eq for NumlockState
This will allow NumlockState to be used as a radio value in
cosmic-settings.
2025-02-17 18:00:09 +01:00
Daniel
2bf74951ea Update moving.rs 2025-02-14 15:32:01 +01:00
Daniel
2553810621
grabs: Snap Window Edges to Close Output Edges 2025-02-14 11:58:09 +01:00
András
2678cf41b2 Reactivated num/caps-lock upon keyboard layour change 2025-02-13 11:45:47 +01:00
Ian Douglas Scott
2728a9ee71 protocol/workspace: Fix behavior with multiple manager instances
Similarly to https://github.com/pop-os/cosmic-comp/pull/1061, track a
weak reference to the manager each workspace/group instance was created
from, instead of just matching by client.
2025-02-13 11:31:38 +01:00
Ian Douglas Scott
723f758439 protocol/workspace: Add support for ext-workspace-v1
To support both `ext-workspace-v1` and `cosmic-workspace-unstable-v1`,
the API exposed by `wayland/protocols/workspace` now uses the ext
workspace `State` and `GroupCapabilties` bitfields, and converts them to
the cosmic types for the cosmic implementation.

`WorkspaceCapabilities` is a custom type that has cosmic-specific and
ext-specific variants, and is mapped on both backends.

The ext protocol adds an `.assign` request on workspaces, which is
added here, though not currently used.

It also adds an `.id` event. Which we'll probably want when we have
persistent workspaces, but it isn't needed currently.

We still need to add an extension protocol of ext-workspaces to replace
a couple cosmic protocol features.
2025-02-13 11:31:38 +01:00
Ian Douglas Scott
aa15c00d12 protocol/workspace: Move cosmic dispatch code to seperate file 2025-02-13 11:31:38 +01:00
Paul Daniel Faria
f1f9d205be
Make numlock state on boot configurable
Make numlock state on boot configurable

This will expose 3 settings for numlock behavior:
1. Numlock is off on boot (this is the current default behavior)
2. Numlock is on on boot
3. Numlock will restore the state from the last boot

Fixes #369

* Address comments:

Get keyboard after create_seat called rather than returning from
create_seat.
Use constants rather than magic numbers for keypress.
Only save updated modifier state after keypresses are handled/skipped.

* Remove unused import, fold other into existing use block.
2025-02-12 14:35:22 +01:00
Ian Douglas Scott
ec1026d9b9 Update libcosmic
Fixes https://github.com/pop-os/cosmic-comp/issues/1071.
2025-02-08 01:27:24 +01:00
Victoria Brekenfeld
6ce08fd2ae chore: Update smithay 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
f6143747da layout/floating: Fix indicator element order 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
0deab8d9ed layout/tiling: Fix swap stack overlay offset 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
c59e9a3c52 layout/tiling: Fix swap indicator element order 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
afae9bb962 render: Scale indicator radius with scale 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
d9b15f1eb3 chore: ron 0.9 update 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
abda6619ff render/cursor: Follow selected scale instead of wanted scale 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
f837b109d0 chore: Update cosmic-config for forward compatibility 2025-02-07 13:32:30 +01:00
Victoria Brekenfeld
b2ba402e2d wl_compositor: Send initial size for maximized/fullscreen surfaces 2025-02-07 13:02:42 +01:00
Victoria Brekenfeld
b793975689 shell: Don't animate programmatic maximize_requests 2025-02-07 13:02:42 +01:00
Victoria Brekenfeld
156f634944 shell: Handle maximize requests before commit 2025-02-07 13:02:42 +01:00
Ian Douglas Scott
a3714b036e Improve mirroring size/scale comparison
To determine if `mirroring_state` is needed, we want to compare the
untransformed dimensions of the source output to the target outputs
mode. The fact the mode comparision previously compared refresh rate
(since it compared the whole `Mode`) seems unintended.

We also re-create the `MirroringState` when the source output
dimensions changes.
2025-02-04 20:01:24 +01:00
Ian Douglas Scott
9963887ac5 Fix mirroring with scale on target output
The actual render will pass a scale other than 1.0 here, so this needs
to do the same.
2025-02-04 20:01:24 +01:00
Ian Douglas Scott
3f5c64f50f Use HashMap entry API in a cleaner way
Careful use of the right `VacantEntry` and `OccupiedEntry` methods makes
this possible without hacks or lifetime errors.
2025-02-04 20:01:24 +01:00
Ian Douglas Scott
32f9ff3cac Use untransformed texture in MirroringState::new_with_renderer
Apply inverse of output transform to mode to get render size, and apply
no transform during rendering. The transform of the output being
mirrored from shouldn't affect the final render.

Fixes issues when source output for mirroring has a transform, and also
fixes issues in https://github.com/pop-os/cosmic-comp/pull/1058
when this code is used for postprocessing, where this resulted in the
same transform being applied twice.
2025-02-04 20:01:24 +01:00
Ian Douglas Scott
3b0aa9e427 shell: Remove last workspace if it follows empty active workspace
Partly fixes
https://github.com/pop-os/cosmic-workspaces-epoch/issues/83, but it
seems like there's at least one other issue with workspaces not being
removed when they should be.

The if condition got a bit complicated here, so I've split it up and
inverted the condition.
2025-02-04 14:55:29 +01:00
Michael Aaron Murphy
476470e6f1 fix(config): wrong config context for system actions on startup 2025-02-04 14:10:54 +01:00
Ian Douglas Scott
63995c4919 Remove CosmicMapped::stack_ref_mut
The methods of `CosmicStack` take `&self`, so this isn't actually needed
for anything.
2025-01-28 10:13:52 -08:00
Ian Douglas Scott
649547d3cc toplevel-management: Move window, not whole stack
If the window is part of a stack, remove it then map it outside of the
stack, before calling `Shell::move_window.` Somewhat similar to the code
in `Shell::move_request`.

It would be more elegant if `move_window` handled this in some way, but
I can't think of a way to change the API there that would be better than
this.

(Perhaps some of the naming of methods could also be updated, given
"window" in functions like this means a `CosmicMapped`.)

Protocol support for moving workspaces would also be useful, but should
involve a new protocol object representing the stack.

Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/41.
2025-01-28 10:12:38 -08:00
Ian Douglas Scott
9b3a42d450 toplevel-management: Make move_to_workspace work with minimized window
Iterating over `.windows()` for each workspace does not iterate over
`minimized_windows`, so `from_workspace` was not found. Simply changing
this to use `element_for_surface` and `space_for` (like `fullscreen` and
`unfullscreen`) fixes this.

Addresses https://github.com/pop-os/cosmic-workspaces-epoch/issues/89.
Though it does unminimize the window, which we may also want to change.
2025-01-28 10:12:38 -08:00
Ian Douglas Scott
7822030e0b workspace: Fix race between binding wl_output and output_enter
https://github.com/pop-os/cosmic-comp/pull/668 previously did this for
toplevel events, but missed the fact that the workspaces protocol has
the same issue.

Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/61.
2025-01-27 15:07:59 -08:00
Victoria Brekenfeld
605bb63a4d kms: Don't try to render inactive outputs 2025-01-21 13:35:53 +01:00
Ashley Wulber
b87049bb7c chore: add log-out shortcut 2025-01-18 14:19:41 +01:00
Joe Neeman
38366700de Only cancel the keyboard grabs that we initiate 2025-01-17 15:49:13 +01:00
Victoria Brekenfeld
53d2cf01aa floating/resize: Fix broken global geometry 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
39528878f8 toplevel_info: Don't send geometry updates, while resizing 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
75661c6ca7 tiling: Refactor blocker code 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
560d234036 tiling: Throttle resizes 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
cf26fe1c07 tiling: Fix flicker during resizing 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
e217a91fec floating: Throttle resizes 2025-01-16 19:44:12 +01:00
Victoria Brekenfeld
df74a322ab mapped: Allow to query in-flight configure for resize throttling 2025-01-16 19:44:12 +01:00
Ian Douglas Scott
6c7ec54bdb Add a COSMIC_DISABLE_SYNCOBJ env var to disable syncobj protocol
If any issues with the syncobj protocol come up, or any issues we
suspect may be related to it, an env var may be helpful.
2025-01-16 19:43:51 +01:00
Ian Douglas Scott
9dddead15d Add linux-drm-syncobj-v1 protocol 2025-01-15 20:20:53 +01:00
Ian Douglas Scott
005093b622 Update smithay-egui, egui 2025-01-15 20:08:02 +01:00
Ian Douglas Scott
1a3494e481 Use get_unconstrained_geometry function for popup position 2025-01-15 00:19:46 +01:00