mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-21 08:01:39 +01:00
refactor(windows): Window implements WorkspaceWindow
BEHAVIOUR (Windows runtime): none; the four lookups of komorebi-core's WorkspaceWindow forward to Window's own title, exe, class and path and nothing calls them through the trait yet. Windows e2e: none needed. Verified: Windows clippy --workspace --locked --all-targets -D warnings: PASS. Not run: Windows tests, e2e.
This commit is contained in:
1 parent
a05076f491
commit
a337eca811
1 file changed
+19
@@ -7,6 +7,7 @@ use crate::window::Window;
|
||||
use crate::windows_backend::backend;
|
||||
use komorebi_backend::WindowId;
|
||||
use komorebi_core::ContainerWindow;
|
||||
use komorebi_core::WorkspaceWindow;
|
||||
|
||||
/// The windows that share one tile of a workspace's layout
|
||||
pub type Container = komorebi_core::Container<Window>;
|
||||
@@ -39,6 +40,24 @@ impl ContainerWindow for Window {
|
||||
}
|
||||
}
|
||||
|
||||
impl WorkspaceWindow for Window {
|
||||
fn title(&self) -> Option<String> {
|
||||
Window::title(*self)
|
||||
}
|
||||
|
||||
fn exe(&self) -> Option<String> {
|
||||
Window::exe(*self)
|
||||
}
|
||||
|
||||
fn class(&self) -> Option<String> {
|
||||
Window::class(*self)
|
||||
}
|
||||
|
||||
fn path(&self) -> Option<String> {
|
||||
Window::path(*self)
|
||||
}
|
||||
}
|
||||
|
||||
/// What only the Windows container has
|
||||
pub trait ContainerExt {
|
||||
/// The handle of the first window of the executable `exe` in this container
|
||||
|
||||
Reference in new issue
Block a user