Commit graph

1394 commits

Author SHA1 Message Date
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
Ashley Wulber
b7937807ad fix: cosmic-protocols rev 2025-01-14 13:26:16 -07:00
Victoria Brekenfeld
609c3c778b chore: Downgrade Cargo.lock version 2025-01-14 18:47:39 +01:00
Victoria Brekenfeld
9ce8621507 chore: update freedesktop-icons 2025-01-14 16:42:22 +01:00
Feike Donia
aa173e0d4f add Dutch translation 2025-01-14 14:27:58 +01:00
Ian Douglas Scott
794ac2fd8d Remove unused glow and drm-ffi dependencies 2025-01-14 11:26:20 +01:00
Victoria Brekenfeld
f73d9cee6b chore: Update smithay 2025-01-14 11:13:05 +01:00
Victoria Brekenfeld
03878357ee chore: cargo update 2025-01-13 21:51:37 +01:00
Victoria Brekenfeld
c608696953 chore: Update libcosmic 2025-01-13 21:27:46 +01:00
Victoria Brekenfeld
bb064e146b chore: Update cosmic-text 2025-01-13 17:39:19 +01:00
Cenk Uluisik
7425ffbad9 fix: add missing libdisplay-info library into flake.nix 2025-01-12 13:09:03 +01:00
Ian Douglas Scott
c9f740210f toplevel-info: Send initial state even if empty
This is imported given how
https://github.com/pop-os/cosmic-protocols/pull/39 uses this event.

But the protocol spec also states the event "is emitted on creation" so
this is seemingly incorrect regardless.
2025-01-08 00:49:02 +01:00
Victoria Brekenfeld
addcbc5039 kms: Don't try to restore modifiers, if we don't have any surfaces 2025-01-07 17:48:14 +01:00
Victoria Brekenfeld
ff22b98ec7 output_configuration: Better log errors 2025-01-07 17:48:06 +01:00
Ian Douglas Scott
7f69244e07 Use Mul impl of Size 2025-01-07 12:50:35 +01:00
Ian Douglas Scott
b685512127 Migrate away from Rectangle::from_loc_and_size
Deprecated in `smithay` by https://github.com/Smithay/smithay/pull/1621.
2025-01-07 12:50:35 +01:00
Ian Douglas Scott
9074447c4f chore: Update smithay 2025-01-07 12:50:35 +01:00
Victoria Brekenfeld
42af2af37d render: Fix race during startup 2025-01-07 12:09:42 +01:00
Victoria Brekenfeld
578c77cb69 chore: github-ci was also missing pixman apparently 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
c07d115d2b chore: Add libdisplay-info to github ci 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
870e5be2a6 kms: Use scaled sizes for placing new outputs 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
bebd7c5c40 kms: Cleanup now that output_elements won't panic for uninitialized outputs 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
db13eea91c shell: Allow active workspace to be None 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
23570ea9f4 chore: Add libdisplay-info dependency for packaging 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
3926aee5b6 debug: Fixup feature compilation 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
6be5009b37 kms: Allow diverging primary plane formats under certain conditions 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
b5cd62fd7a kms: skip cursor updates for fullscreen content above the minimum refresh rate 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
adcb81bbe0 deps: Switch from edid-rs to libdisplay-info 2025-01-06 20:23:05 +01:00
Victoria Brekenfeld
546966bf15 drm_lease: Disable overlay planes when active 2025-01-06 20:23:05 +01:00