Commit graph

289 commits

Author SHA1 Message Date
Daniel
2553810621
grabs: Snap Window Edges to Close Output Edges 2025-02-14 11:58:09 +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
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
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
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
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
Victoria Brekenfeld
870e5be2a6 kms: Use scaled sizes for placing new 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
David Brochero
68b6156aa8
Fix sticky toggle crashes on maximized windows (#1110) 2025-01-06 12:10:49 +01:00
Victoria Brekenfeld
f2e53f09c9 shell: Fix stacking maximized windows 2024-12-16 17:29:56 +01:00
Victoria Brekenfeld
2e1f6a4746 shell: Unset focused outputs on remove_output 2024-12-13 16:23:30 +01:00
Ian Douglas Scott
61692b21ad Run cargo format 2024-11-18 18:24:53 +01:00
Victoria Brekenfeld
0092dac08c input: Use render_input_order 2024-10-22 19:43:47 +02:00
Ian Douglas Scott
2497992d31 Don't create initial empty workspace when there are other workspaces
`WorkspaceSet::new()` now creates a set with no workspaces, instead of
one with a single workspace.
2024-10-21 18:10:53 +02:00
Ian Douglas Scott
229c794aad On adding output add set after processing other sets
Maybe there's some reason for this, but I don't think the first loop
needs to handle the new set.

I do not expect this to change behavior.
2024-10-21 18:10:53 +02:00
Ian Douglas Scott
fb2631adce Fix workspace indices when workspace is moved to another output
Previously, workspace numbering could end up with numbers skipped,
because an intermediate workspace was moved.
2024-10-21 18:10:53 +02:00
Ian Douglas Scott
c8ebac354c Preserve active workspace when workspaces are moved back to another output
Instead of preserving the active workspace index, which may not match if
a workspace before it has been moved back to another output.
2024-10-21 18:10:53 +02:00
Ian Douglas Scott
400a7752fd When moving workspaces on output remove, don't movve empty workspace
This resulted in a somewhat weird effect, where the empty workspace at
the end on the monitor has an `output_stack` with the other output, so
a window created there is moved back to to second output when it is
re-connected. This seems unexpected.
2024-10-21 18:10:53 +02:00
Ian Douglas Scott
6fc36cb00e Fix spelling of prefers 2024-10-21 18:10:53 +02:00
Vukašin Vojinović
b7a34bdd1e fix(menu): styling
Also improves the styling of resize indicators, and removes the unnecessary `.density()` method call for the SSD header.
2024-10-10 19:58:56 +02:00
Ian Douglas Scott
15a6425836
Set default output transform based on DRM panel orientation (#901) 2024-10-07 18:12:40 +02:00
Christian Meissl
afdb656778 dnd: correct handling of cursor buffer offset 2024-09-23 11:13:21 +02:00
Victoria Brekenfeld
9c7c41c508 toplevel-info/mgmt: Update to v2/v3 2024-09-23 10:55:00 +02:00
Victoria Brekenfeld
4d215755f6 shell: Fix incomplete focus_stack after swapping 2024-09-10 21:10:02 +02:00
Victoria Brekenfeld
03430b76c5 shell: Allow moving groups between outputs 2024-09-10 20:51:08 +02:00
Victoria Brekenfeld
b111c9ff48 shell: Rewrite get_focused_output to properly account for groups 2024-09-10 19:38:48 +02:00
Victoria Brekenfeld
0d048b1a8e input: Fix focus_follows_cursor across outputs 2024-09-09 20:12:10 +02:00
Victoria Brekenfeld
f0f1db4358 shell: next_focus should use active_output 2024-09-09 20:02:12 +02:00
Victoria Brekenfeld
5006eae60b actions: Fix focus on Output-actions 2024-09-09 20:01:42 +02:00
Richard Weber
bd95340992 Apply suggestions from code review
Co-authored-by: Victoria Brekenfeld <4404502+Drakulix@users.noreply.github.com>
2024-09-04 20:50:42 +02:00
Richard Weber
5482ff65e5 Add config reloading for tiling exceptions 2024-09-04 20:50:42 +02:00
Richard Weber
5fe9ba29eb Use new config from cosmic-settings-config 2024-09-04 20:50:42 +02:00
Richard Weber
ec86fc33e0 Add error handling for configuration conversion to regex rules 2024-09-04 20:50:42 +02:00
Richard Weber
e8947b8742 Move tiling exceptions to configuration file 2024-09-04 20:50:42 +02:00
skewballfox
7da0bc430a added cursor_follows_focus and focus_follows_cursor 2024-09-04 20:22:40 +02:00
julianbraha
52280e9823 Remove unnecessary casting 2024-09-03 16:08:17 +02:00
Victoria Brekenfeld
971c28db38 xwayland: Add descaling option 2024-09-02 18:58:13 +02:00
julianbraha
52ad30c264 Remove unnecessary lifetimes 2024-08-30 17:53:56 +02:00
Ian Douglas Scott
1342c000ab Add ext-foreign-toplevel-list-v1 protocol 2024-08-29 17:04:12 +02:00
BrunoWallner
8114116e04 fixed animation issue completely for keyboard navigation and partially for touchpad gestures 2024-08-26 14:26:57 +02:00
João Capucho
3c24934f48 Track if a move or resize request is client initiated 2024-08-23 17:18:39 +02:00
Victoria Brekenfeld
7660f7aaa9 focus: Don't swap focus from maximized tiled windows 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
f9d39144ed focus: Check target for fullscreen instead of workspace 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
c299748997 config: Load toolkit config on start 2024-08-02 20:54:15 +02:00
Victoria Brekenfeld
d4926c3a9e shell: Allow dragged windows to be focused 2024-07-17 18:57:21 +02:00
Ian Douglas Scott
0636bcdef3 Add workspace_overview_is_open function; put in a utils::quirks mod
This is increasingly not just related to screencopy, so it's weird to
add there. I don't see any other module that fits, so add one called
"quirks" (like the Linux kernel uses for device-specific handling in
generic drives).
2024-07-15 17:12:05 +02:00
Ian Douglas Scott
31358d1993 Inhibit workspace animations when workspaces view is open
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/27.

We want this to apply to changes to workspace either through keybindings
or the cosmic-workspaces UI, so it adding a check here seems reasonable.
In principle it could be good to have some kind of privileged protocol
for setting things like this.

We may also want a configuration option to disable animations at some
point.
2024-07-15 17:12:05 +02:00
Victoria Brekenfeld
c506d94ac8 shell: Don't consider active overviews animations 2024-07-15 16:31:24 +02:00
Victoria Brekenfeld
b1778dabb3 shell: Don't crash on zero outputs for global-mode 2024-07-12 19:29:47 +02:00