Commit graph

16 commits

Author SHA1 Message Date
Ian Douglas Scott
e54f4b4963 protocols/workspace: Set ext workspace id for pinned workspace
The `id` is defined to be sent only once, on creation of the handle or
later. And only for workspaces that are "likely to be stable across
multiple sessions".

Set we add an `id` initially for pinned workspaces, and add one when the
workspace is pinned.

The `id` is not supposed to be human readable, so we just use a random
value.
2025-08-22 11:58:07 +02:00
Victoria Brekenfeld
465813c1c5 shell: Using parking_lot's RwLock for fairness guarantees 2025-05-27 20:00:21 +02:00
Ian Douglas Scott
96e9bf3b81 Initial support for workspace pinning and moving
Adds support for cosmic-workspace-v2 pin, unpin, move_after, and
move_before requests.

Both features need some work with workspaces span displays mode, so that
will need more fixes later.

We also want to generate a unique id for pinned workspaces to send in
the ext-workspace-v1 protocol. But that isn't a strict requirement for
anything. So I haven't yet fully implemented that. We'll also want to
persist other things, like workspace naming when that's added.

Overall, though, with separate workspaces per display, this is working
pretty well.
2025-04-24 12:45:50 +02:00
Ian Douglas Scott
e944ee9b2f protocols/workspace: Store request queue in workspace manager udata
This is slightly simpler, if there's not some reason I'm missing to do
this as it was previously done. And in particular provides a cleaner
API (if we wanted to move this to Smithay; perhaps without the Cosmic
extension).

But it also should be more correct. Presumably if a client (unusually)
had multiple components with their own `ext_workspace_manager_v1`
instance, they should have their own queues, and
`ext_workspace_manager_v1::commit` should be independent.

Inevitably, there's a racy element to multiple components trying to
update the workspace state like this, but it should behave the same as
two clients with separate connections.

(This is different from `CompositorClientState`, since the commit queue
there is fundamentally tied to the client, and different components with
their own compositor instance way have related surfaces.)
2025-04-22 07:48:23 -07:00
Ian Douglas Scott
aac8166962 Add cosmic-workspace-v2, image source, toplevel info changes
This new protocol extends `ext-workspace-v1` with the same additional
functionality `cosmic-workspace-v1` provided. Toplevel info and toplevel
management are also updated to use ext handles, and there's an image
source for ext workspaces.

For now, the old protocol is still supported.
2025-03-03 12:30:25 +01:00
Victoria Brekenfeld
5d5a510691 state: Move shell behind RwLock 2024-04-16 18:50:54 +02:00
Victoria Brekenfeld
647deb81f1 shell: Move seats into shell 2024-04-16 18:50:54 +02:00
Ryan Brue
fc2173d028 feat: workspace switching touchpad gestures 2024-03-22 12:12:25 +01:00
Victoria Brekenfeld
c0f7524a09 shell: Drop static workspaces 2024-02-07 21:40:23 +01:00
Victoria Brekenfeld
72df9d07e6 shell: One workspace per output 2023-10-25 19:41:55 +02:00
Victoria Brekenfeld
be918152d5 shell: Implement Workspace Layout 2023-05-25 00:15:42 +02:00
Victoria Brekenfeld
57f15da85d ext_workspace: Fix activation for output-bound 2022-11-23 16:10:37 +01:00
Victoria Brekenfeld
00f1b029da wip: New shell logic 2022-11-23 16:08:32 +01:00
Victoria Brekenfeld
39de286d51 cargo fmt 2022-07-04 16:01:06 +02:00
Victoria Brekenfeld
43062c1754 debug: Update for egui 0.18 2022-07-04 16:01:06 +02:00
Victoria Brekenfeld
06d5989223 wayland: Rework handlers and protocols into separate files 2022-07-04 16:01:06 +02:00