diff options
Diffstat (limited to 'src/window/mapped.rs')
| -rw-r--r-- | src/window/mapped.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 022a57a0..75551ef1 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -66,6 +66,9 @@ pub struct Mapped { /// Whether this window is the active window in its column. is_active_in_column: bool, + /// Whether this window is floating. + is_floating: bool, + /// Buffer to draw instead of the window when it should be blocked out. block_out_buffer: RefCell<SolidColorBuffer>, @@ -163,6 +166,7 @@ impl Mapped { need_to_recompute_rules: false, is_focused: false, is_active_in_column: false, + is_floating: false, block_out_buffer: RefCell::new(SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.])), animate_next_configure: false, animate_serials: Vec::new(), @@ -220,6 +224,10 @@ impl Mapped { self.is_active_in_column } + pub fn is_floating(&self) -> bool { + self.is_floating + } + pub fn set_is_focused(&mut self, is_focused: bool) { if self.is_focused == is_focused { return; @@ -690,6 +698,12 @@ impl LayoutElement for Mapped { self.need_to_recompute_rules |= changed; } + fn set_floating(&mut self, floating: bool) { + let changed = self.is_floating != floating; + self.is_floating = floating; + self.need_to_recompute_rules |= changed; + } + fn set_bounds(&self, bounds: Size<i32, Logical>) { self.toplevel().with_pending_state(|state| { state.bounds = Some(bounds); |
