From 37cbed890f86ba148717b2e85a75337a17bd0167 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Tue, 15 Aug 2023 12:49:26 +0400 Subject: Add initial layer-shell implementation Those surfaces never receive mouse focus and always keyboard focus, which may not be always good, but it'll do for now. --- src/layout.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/layout.rs') diff --git a/src/layout.rs b/src/layout.rs index c4ab517b..7dc89c3d 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -566,6 +566,16 @@ impl MonitorSet { .find(|monitor| &monitor.output == output) } + pub fn outputs(&self) -> impl Iterator + '_ { + let monitors = if let MonitorSet::Normal { monitors, .. } = self { + &monitors[..] + } else { + &[][..] + }; + + monitors.iter().map(|mon| &mon.output) + } + pub fn move_left(&mut self) { let Some(monitor) = self.active_monitor() else { return; -- cgit