Skip to content

Commit

Permalink
toplevel-management: Add a move_to_workspace request
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 committed Dec 6, 2023
1 parent 5faec87 commit d901216
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client-toolkit/src/toplevel_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl ToplevelManagerState {
D: Dispatch<zcosmic_toplevel_manager_v1::ZcosmicToplevelManagerV1, ()> + 'static,
{
let manager = registry
.bind_one::<zcosmic_toplevel_manager_v1::ZcosmicToplevelManagerV1, _, _>(qh, 1..=1, ())
.bind_one::<zcosmic_toplevel_manager_v1::ZcosmicToplevelManagerV1, _, _>(qh, 1..=2, ())
.unwrap();

Self { manager }
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub mod toplevel_management {
pub mod v1 {
wayland_protocol!(
"./unstable/cosmic-toplevel-management-unstable-v1.xml",
[crate::toplevel_info::v1]
[crate::toplevel_info::v1, crate::workspace::v1]
);
}
}
Expand Down
11 changes: 10 additions & 1 deletion unstable/cosmic-toplevel-management-unstable-v1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
THIS SOFTWARE.
</copyright>

<interface name="zcosmic_toplevel_manager_v1" version="1">
<interface name="zcosmic_toplevel_manager_v1" version="2">
<description summary="control open apps">
This protocol allows clients such as a taskbar to request the compositor
to preform typical actions on open toplevels. The compositor is in all
Expand Down Expand Up @@ -167,6 +167,15 @@
<arg name="height" type="int"/>
</request>

<request name = "move_to_workspace" since="2">
<description summary="move toplevel to workspace">
Move window to workspace, on given output.
</description>
<arg name="toplevel" type="object" interface="zcosmic_toplevel_handle_v1"/>
<arg name="workspace" type="object" interface="zcosmic_workspace_handle_v1"/>
<arg name="output" type="object" interface="wl_output"/>
</request>

<enum name="error">
<entry name="invalid_rectangle" value="0"
summary="the provided rectangle is invalid"/>
Expand Down

0 comments on commit d901216

Please sign in to comment.