diff options
Diffstat (limited to 'src/clients/tile.rs')
-rw-r--r-- | src/clients/tile.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/clients/tile.rs b/src/clients/tile.rs index e089c3f..f1f00a7 100644 --- a/src/clients/tile.rs +++ b/src/clients/tile.rs @@ -4,7 +4,7 @@ use std::cmp::min; use crate::conn_info::Connection; -use super::{MonitorGeometry, MonitorInfo}; +use super::{Client, MonitorGeometry, MonitorInfo}; /// A simple tiling function #[allow( @@ -13,12 +13,12 @@ use super::{MonitorGeometry, MonitorInfo}; clippy::cast_possible_truncation, clippy::cast_lossless )] -pub fn tile(mon: &mut MonitorInfo, conn: &Connection<'_>) { - if mon.clients.is_empty() { +pub fn tile(conn: &Connection<'_>, clients: &mut [Client], mon: &MonitorInfo) { + if clients.is_empty() { return; } - let n = mon.clients_tiled_mut().count(); + let n = mon.iter_visible_tiling(&mut *clients).count(); let nmaster = 1; let mfact = 0.6; @@ -38,7 +38,7 @@ pub fn tile(mon: &mut MonitorInfo, conn: &Connection<'_>) { }; let (mut main_y, mut second_y) = (0, 0); - for (i, c) in mon.clients_tiled_mut().enumerate() { + for (i, c) in mon.iter_visible_tiling(clients).enumerate() { if i < nmaster { let h = (mon_height - main_y) / (min(nmaster, n) - i) as u16; c.set_geom( |