diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-23 10:40:52 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-23 11:13:55 +0300 |
| commit | a10705fb200b452802a1ba7cd47679536e0ef849 (patch) | |
| tree | 7e12f0602c4652e043021392632e7e4e24ebb4fe /src/layout/floating.rs | |
| parent | b01b8afa8c8f9070300243050d9790e38fd19145 (diff) | |
| download | niri-a10705fb200b452802a1ba7cd47679536e0ef849.tar.gz niri-a10705fb200b452802a1ba7cd47679536e0ef849.tar.bz2 niri-a10705fb200b452802a1ba7cd47679536e0ef849.zip | |
Add toggle-window-rule-opacity action
Diffstat (limited to 'src/layout/floating.rs')
| -rw-r--r-- | src/layout/floating.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/layout/floating.rs b/src/layout/floating.rs index cb757d67..c6a17e30 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -365,6 +365,14 @@ impl<W: LayoutElement> FloatingSpace<W> { .map(Tile::window) } + pub fn active_window_mut(&mut self) -> Option<&mut W> { + let id = self.active_window_id.as_ref()?; + self.tiles + .iter_mut() + .find(|tile| tile.window().id() == id) + .map(Tile::window_mut) + } + pub fn has_window(&self, id: &W::Id) -> bool { self.tiles.iter().any(|tile| tile.window().id() == id) } |
