diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-15 12:49:26 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-15 12:49:26 +0400 |
| commit | 37cbed890f86ba148717b2e85a75337a17bd0167 (patch) | |
| tree | 5c779ba500eff97f7362f8ae7ec3eb2c8725b29f /src/layout.rs | |
| parent | 8cdd37b9932eb4acd8e983af53d0ba7bb04a3e64 (diff) | |
| download | niri-37cbed890f86ba148717b2e85a75337a17bd0167.tar.gz niri-37cbed890f86ba148717b2e85a75337a17bd0167.tar.bz2 niri-37cbed890f86ba148717b2e85a75337a17bd0167.zip | |
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.
Diffstat (limited to 'src/layout.rs')
| -rw-r--r-- | src/layout.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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<W: LayoutElement> MonitorSet<W> { .find(|monitor| &monitor.output == output) } + pub fn outputs(&self) -> impl Iterator<Item = &Output> + '_ { + 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; |
