config: add Window
This commit is contained in:
parent
ab095b89cf
commit
9977f9dfdf
19 changed files with 1172 additions and 203 deletions
|
|
@ -46,7 +46,9 @@
|
|||
#[expect(unused_imports)]
|
||||
use crate::input::Seat;
|
||||
use {
|
||||
crate::{_private::ipc::WorkspaceSource, keyboard::ModifiedKeySym, video::Connector},
|
||||
crate::{
|
||||
_private::ipc::WorkspaceSource, keyboard::ModifiedKeySym, video::Connector, window::Window,
|
||||
},
|
||||
serde::{Deserialize, Serialize},
|
||||
std::{
|
||||
fmt::{Debug, Display, Formatter},
|
||||
|
|
@ -70,6 +72,7 @@ pub mod tasks;
|
|||
pub mod theme;
|
||||
pub mod timer;
|
||||
pub mod video;
|
||||
pub mod window;
|
||||
pub mod xwayland;
|
||||
|
||||
/// A planar direction.
|
||||
|
|
@ -174,6 +177,13 @@ impl Workspace {
|
|||
pub fn move_to_output(self, output: Connector) {
|
||||
get!().move_to_output(WorkspaceSource::Explicit(self), output);
|
||||
}
|
||||
|
||||
/// Returns the root container of this workspace.
|
||||
///
|
||||
/// If no such container exists, [`Window::exists`] returns false.
|
||||
pub fn window(self) -> Window {
|
||||
get!(Window(0)).get_workspace_window(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the workspace with the given name.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue