mirror of
https://github.com/YaLTeR/niri.git
synced 2024-10-26 20:04:05 +03:00
Make window a subdirectory
This commit is contained in:
parent
bbb4caeb8c
commit
f31e105043
24
src/window/mod.rs
Normal file
24
src/window/mod.rs
Normal file
@ -0,0 +1,24 @@
|
||||
use crate::layout::workspace::ColumnWidth;
|
||||
|
||||
pub mod unmapped;
|
||||
pub use unmapped::{InitialConfigureState, Unmapped};
|
||||
|
||||
/// Rules fully resolved for a window.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct ResolvedWindowRules {
|
||||
/// Default width for this window.
|
||||
///
|
||||
/// - `None`: unset (global default should be used).
|
||||
/// - `Some(None)`: set to empty (window picks its own width).
|
||||
/// - `Some(Some(width))`: set to a particular width.
|
||||
pub default_width: Option<Option<ColumnWidth>>,
|
||||
|
||||
/// Output to open this window on.
|
||||
pub open_on_output: Option<String>,
|
||||
|
||||
/// Whether the window should open full-width.
|
||||
pub open_maximized: Option<bool>,
|
||||
|
||||
/// Whether the window should open fullscreen.
|
||||
pub open_fullscreen: Option<bool>,
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
use smithay::desktop::Window;
|
||||
use smithay::output::Output;
|
||||
|
||||
use super::ResolvedWindowRules;
|
||||
use crate::layout::workspace::ColumnWidth;
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -43,26 +44,6 @@ pub enum InitialConfigureState {
|
||||
},
|
||||
}
|
||||
|
||||
/// Rules fully resolved for a window.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct ResolvedWindowRules {
|
||||
/// Default width for this window.
|
||||
///
|
||||
/// - `None`: unset (global default should be used).
|
||||
/// - `Some(None)`: set to empty (window picks its own width).
|
||||
/// - `Some(Some(width))`: set to a particular width.
|
||||
pub default_width: Option<Option<ColumnWidth>>,
|
||||
|
||||
/// Output to open this window on.
|
||||
pub open_on_output: Option<String>,
|
||||
|
||||
/// Whether the window should open full-width.
|
||||
pub open_maximized: Option<bool>,
|
||||
|
||||
/// Whether the window should open fullscreen.
|
||||
pub open_fullscreen: Option<bool>,
|
||||
}
|
||||
|
||||
impl Unmapped {
|
||||
/// Wraps a newly created window that hasn't been initially configured yet.
|
||||
pub fn new(window: Window) -> Self {
|
Loading…
Reference in New Issue
Block a user