Skip to content

Commit

Permalink
Merge pull request #21 from pop-os/move-to-workspace
Browse files Browse the repository at this point in the history
toplevel-management: Add a `move_to_workspace` request
  • Loading branch information
Drakulix authored Dec 7, 2023
2 parents 5faec87 + 81f0439 commit c1b6516
Show file tree
Hide file tree
Showing 3 changed files with 13 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
12 changes: 11 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 All @@ -49,6 +49,7 @@
<entry name="maximize" value="3" summary="set_maximized and unset_maximized requests are available"/>
<entry name="minimize" value="4" summary="set_minimized and unset_minimized requests are available"/>
<entry name="fullscreen" value="5" summary="set_fullscreen and unset_fullscreen requests are available"/>
<entry name="move_to_workspace" value="6" since="2" summary="move_to_workspace request is available"/>
</enum>

<event name="capabilities">
Expand Down Expand Up @@ -167,6 +168,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 c1b6516

Please sign in to comment.