diff options
Diffstat (limited to 'src/window')
| -rw-r--r-- | src/window/mapped.rs | 7 | ||||
| -rw-r--r-- | src/window/mod.rs | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 6b539e46..ac508990 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -35,7 +35,8 @@ use crate::render_helpers::{BakedBuffer, RenderTarget, SplitElements}; use crate::utils::id::IdCounter; use crate::utils::transaction::Transaction; use crate::utils::{ - get_credentials_for_surface, send_scale_transform, with_toplevel_role, ResizeEdge, + get_credentials_for_surface, send_scale_transform, update_tiled_state, with_toplevel_role, + ResizeEdge, }; #[derive(Debug)] @@ -462,6 +463,10 @@ impl Mapped { }; self.window.send_frame(output, time, throttle, should_send); } + + pub fn update_tiled_state(&self, prefer_no_csd: bool) { + update_tiled_state(self.toplevel(), prefer_no_csd, self.rules.tiled_state); + } } impl Drop for Mapped { diff --git a/src/window/mod.rs b/src/window/mod.rs index c99d10d2..7c0da71b 100644 --- a/src/window/mod.rs +++ b/src/window/mod.rs @@ -111,6 +111,9 @@ pub struct ResolvedWindowRules { /// Multiplier for all scroll events sent to this window. pub scroll_factor: Option<f64>, + + /// Override whether to set the Tiled xdg-toplevel state on the window. + pub tiled_state: Option<bool>, } impl<'a> WindowRef<'a> { @@ -217,6 +220,7 @@ impl ResolvedWindowRules { block_out_from: None, variable_refresh_rate: None, scroll_factor: None, + tiled_state: None, } } @@ -335,6 +339,9 @@ impl ResolvedWindowRules { if let Some(x) = rule.scroll_factor { resolved.scroll_factor = Some(x.0); } + if let Some(x) = rule.tiled_state { + resolved.tiled_state = Some(x); + } } resolved.open_on_output = open_on_output.map(|x| x.to_owned()); |
