Commit graph

38 commits

Author SHA1 Message Date
Ian Douglas Scott
cac7a5aca6 image-copy: Use abstraction that's now provided by Smithay
This doesn't change much, since the Smithay implementation is based on
the `cosmic-comp` version, but made more generic. We provide our own
implementation for our workspace capture protocol, but otherwise Smithay
handles the boilerplate now.

This should not cause any change in behavior.
2026-02-05 02:01:14 +01:00
Nikola Hristov
ea429a778e fix: Toplevel disappearing after unmap 2026-01-13 16:50:01 +01:00
Vukašin Vojinović
1f7f0c70b7 chore: format for Rust 2024 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
5e9ea93819 chore: manual clippy 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
0847247c33 chore: clippy 2025-10-22 23:55:11 +02:00
Vukašin Vojinović
7f7ab8bcbe chore: Rust 2024 edition
Set the formatting style to 2021 edition to avoid disrupting existing work.
Remove when possible.
2025-08-21 13:10:11 +02:00
Ian Douglas Scott
85254b47d6 protocol/workspace: Drop support for cosmic v1 protocol
Clients have been updated to use ext-workspace-v1 and
cosmic-workspace-v2.

Removing this should save some duplication of having to update both
cosmic workspace v1 and ext workspace code, and should help with things
like using the same workspace handle when a workspace moves to a
different group (which is something that was changed before the final
version of the ext-workspace-v1 protocol.)
2025-04-22 07:48:23 -07:00
Ian Douglas Scott
2fe5897db0 Replace screencopy with ext-image-copy-capture-v1 2025-04-01 18:22:42 +02: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
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
Victoria Brekenfeld
39528878f8 toplevel_info: Don't send geometry updates, while resizing 2025-01-16 19:44:12 +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
Ian Douglas Scott
6707c92522 toplevel-info: Fix behavior with multiple instances of global
Instead of looking for toplevel handles for the client, look for
toplevel handles for the specific global instance.
2024-12-14 09:32:11 +01:00
Ashley Wulber
76863aaf9b fix: filter by active workspace in overlap notify 2024-12-05 18:20:10 +01:00
Ian Douglas Scott
61692b21ad Run cargo format 2024-11-18 18:24:53 +01:00
Victoria Brekenfeld
743e5d4360 toplevel_info: Fix racy data creation 2024-10-25 11:05:41 +02:00
Ian Douglas Scott
540ed3d170 Use to_ne_bytes() instead of unsound Vec::from_raw_parts
`from_raw_parts()` is only sound if the alignment is the same, so it
can't be used to covert to a `Vec<u8>` from a type with a greater
alignment.

This isn't hard to avoid, luckily.
2024-10-21 18:10:53 +02:00
Victoria Brekenfeld
bd04d68106 overlap-notify: Initial implementation 2024-09-23 10:55:00 +02:00
Victoria Brekenfeld
9c7c41c508 toplevel-info/mgmt: Update to v2/v3 2024-09-23 10:55:00 +02:00
Ian Douglas Scott
c1bf410466 toplevel-info: Fix race between binding wl_ouput and output_enter
This fixes an issue with `cosmic-panel` where, when a workspace is moved
back to an output after a monitor is disconnected and reconnected, the
panel doesn't hide because `cosmic-panel` thinks no toplevel is open on
that monitor.

After some testing, it seems `output_enter` isn't being sent here. In
particular, the `output_leave` call happens before the client binds the
`wl_output`, so there is no `wl_output` to send in an event yet.

This is addressed by keeping track of a set of `wl_output`s that we have
sent the event to. So if an output is bound, `refresh` can add it to
this list and send the event.

This is not needed for workspaces (though it could be done similarly)
since the handle objects are created by server events. So no race should
occur as long as the workspaces global is bound before the toplevel info
one.
2024-08-01 16:35:26 +02:00
Victoria Brekenfeld
5d5a510691 state: Move shell behind RwLock 2024-04-16 18:50:54 +02:00
Victoria Brekenfeld
11a8265145 toplevel-info: Also send workspace info for new windows 2024-04-11 13:28:49 +02:00
Victoria Brekenfeld
973cfed87b shell: Handle unmapped windows correctly 2024-03-25 12:51:01 +01:00
Victoria Brekenfeld
3eb7e5f82e shell: implement minimize 2024-03-04 19:20:52 +01:00
Victoria Brekenfeld
4e12957169 chore: Update deps 2023-10-02 21:51:49 +02:00
Victoria Brekenfeld
a308997fd4 chore: Update smithay 2023-07-12 18:57:38 +02:00
Victoria Brekenfeld
7992ad67f6 update smithay, iced; reworked window for xwayland 2023-01-16 15:37:54 +01:00
Victoria Brekenfeld
5a4df346a8 wip: screencopy 2022-11-23 16:09:58 +01:00
Victoria Brekenfeld
00f1b029da wip: New shell logic 2022-11-23 16:08:32 +01:00
Ian Douglas Scott
7b670afc36 Update smithay and wayland-rs
Includes updates for split between `smithay::wayland::output` and
`smithay::output`.
2022-09-09 20:00:00 -07:00
Victoria Brekenfeld
9e0a6e1b5f fmt commit 2022-08-30 13:28:36 +02:00
Victoria Brekenfeld
944af9ab85 export_dmabuf: Initial support 2022-08-05 14:28:37 +02:00
Victoria Brekenfeld
6113167b31 toplevel-info: fix typo 2022-07-19 19:42:05 +02:00
Victoria Brekenfeld
28493b95c5 toplevel_info: send creation event 2022-07-19 19:30:06 +02:00
Victoria Brekenfeld
6b659eb107 wayland: toplevel management protocol 2022-07-18 21:26:02 +02:00
Victoria Brekenfeld
994114661b deps: Update for wayland-rs beta.8 2022-07-18 18:04:02 +02:00
Victoria Brekenfeld
39de286d51 cargo fmt 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