Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toplevel-management: Add a move_to_workspace request #21

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading