diff options
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/monitor.rs | 3 | ||||
| -rw-r--r-- | src/layout/workspace.rs | 46 |
2 files changed, 23 insertions, 26 deletions
diff --git a/src/layout/monitor.rs b/src/layout/monitor.rs index 791b8b7e..c6cfd615 100644 --- a/src/layout/monitor.rs +++ b/src/layout/monitor.rs @@ -7,7 +7,6 @@ use smithay::backend::renderer::element::utils::{ CropRenderElement, Relocate, RelocateRenderElement, }; use smithay::backend::renderer::{ImportAll, Renderer}; -use smithay::desktop::Window; use smithay::output::Output; use smithay::utils::{Logical, Point, Rectangle, Scale}; @@ -578,9 +577,7 @@ impl<W: LayoutElement> Monitor<W> { let ws = &self.workspaces[self.active_workspace_idx]; ws.render_above_top_layer() } -} -impl Monitor<Window> { pub fn render_elements<R: Renderer + ImportAll>( &self, renderer: &mut R, diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 73a87376..5ecd25e0 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -1058,29 +1058,6 @@ impl<W: LayoutElement> Workspace<W> { self.columns[self.active_column_idx].is_fullscreen } -} - -impl Workspace<Window> { - pub fn refresh(&self, is_active: bool) { - let bounds = self.toplevel_bounds(); - - for (col_idx, col) in self.columns.iter().enumerate() { - for (tile_idx, tile) in col.tiles.iter().enumerate() { - let win = tile.window(); - let active = is_active - && self.active_column_idx == col_idx - && col.active_tile_idx == tile_idx; - win.set_activated(active); - - win.toplevel().with_pending_state(|state| { - state.bounds = Some(bounds); - }); - - win.toplevel().send_pending_configure(); - win.refresh(); - } - } - } pub fn render_elements<R: Renderer + ImportAll>( &self, @@ -1137,6 +1114,29 @@ impl Workspace<Window> { } } +impl Workspace<Window> { + pub fn refresh(&self, is_active: bool) { + let bounds = self.toplevel_bounds(); + + for (col_idx, col) in self.columns.iter().enumerate() { + for (tile_idx, tile) in col.tiles.iter().enumerate() { + let win = tile.window(); + let active = is_active + && self.active_column_idx == col_idx + && col.active_tile_idx == tile_idx; + win.set_activated(active); + + win.toplevel().with_pending_state(|state| { + state.bounds = Some(bounds); + }); + + win.toplevel().send_pending_configure(); + win.refresh(); + } + } + } +} + impl<W: LayoutElement> Column<W> { fn new( window: W, |
