protocol/toplevel_management: Use WorkspaceHandle in argument
Already depends on `WorkspaceHandler`, so it can get the handle, and toplevel info uses `WorkspaceHandle`s.
This commit is contained in:
parent
1f2434e590
commit
0a6f2726cb
2 changed files with 15 additions and 15 deletions
|
|
@ -12,14 +12,14 @@ use smithay::{
|
|||
};
|
||||
|
||||
pub use cosmic_protocols::toplevel_management::v1::server::zcosmic_toplevel_manager_v1::ZcosmicToplelevelManagementCapabilitiesV1 as ManagementCapabilities;
|
||||
use cosmic_protocols::{
|
||||
toplevel_management::v1::server::zcosmic_toplevel_manager_v1::{
|
||||
self, ZcosmicToplevelManagerV1,
|
||||
},
|
||||
workspace::v1::server::zcosmic_workspace_handle_v1::ZcosmicWorkspaceHandleV1,
|
||||
use cosmic_protocols::toplevel_management::v1::server::zcosmic_toplevel_manager_v1::{
|
||||
self, ZcosmicToplevelManagerV1,
|
||||
};
|
||||
|
||||
use super::toplevel_info::{window_from_handle, ToplevelInfoHandler, ToplevelState, Window};
|
||||
use super::{
|
||||
toplevel_info::{window_from_handle, ToplevelInfoHandler, ToplevelState, Window},
|
||||
workspace::WorkspaceHandle,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ToplevelManagementState {
|
||||
|
|
@ -68,7 +68,7 @@ where
|
|||
&mut self,
|
||||
dh: &DisplayHandle,
|
||||
window: &<Self as ToplevelInfoHandler>::Window,
|
||||
workspace: ZcosmicWorkspaceHandleV1,
|
||||
workspace: WorkspaceHandle,
|
||||
output: Output,
|
||||
) {
|
||||
}
|
||||
|
|
@ -255,8 +255,12 @@ where
|
|||
output,
|
||||
} => {
|
||||
let window = window_from_handle(toplevel).unwrap();
|
||||
if let Some(output) = Output::from_resource(&output) {
|
||||
state.move_to_workspace(dh, &window, workspace, output);
|
||||
if let Some(workspace_handle) =
|
||||
state.workspace_state().get_workspace_handle(&workspace)
|
||||
{
|
||||
if let Some(output) = Output::from_resource(&output) {
|
||||
state.move_to_workspace(dh, &window, workspace_handle, output);
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => unreachable!(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue