diff options
| author | yrkv <yegor@tydbits.com> | 2025-08-16 01:42:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-16 11:42:08 +0300 |
| commit | af30cc8df68b29973c8b9eec290f9e6b93463929 (patch) | |
| tree | c216831fe217e191c958545b7536183d67b1b186 /src/layout/workspace.rs | |
| parent | a003e013074b5188a2b1f2364fff90fb4caf972a (diff) | |
| download | niri-af30cc8df68b29973c8b9eec290f9e6b93463929.tar.gz niri-af30cc8df68b29973c8b9eec290f9e6b93463929.tar.bz2 niri-af30cc8df68b29973c8b9eec290f9e6b93463929.zip | |
niri-ipc: Add window positions and sizes (#1265)
* Add window sizes and positions to the IPC
* basic fixes
* report window_loc instead of window pos
* clean ups
* make scrolling indices 1-based
* add printing to niri msg windows
* don't include render offset in floating tile pos
---------
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 588a6971..c01df8fd 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -5,7 +5,7 @@ use std::time::Duration; use niri_config::{ CenterFocusedColumn, CornerRadius, OutputName, PresetSize, Workspace as WorkspaceConfig, }; -use niri_ipc::{ColumnDisplay, PositionChange, SizeChange}; +use niri_ipc::{ColumnDisplay, PositionChange, SizeChange, WindowLayout}; use smithay::backend::renderer::gles::GlesRenderer; use smithay::desktop::{layer_map_for_output, Window}; use smithay::output::Output; @@ -1427,6 +1427,12 @@ impl<W: LayoutElement> Workspace<W> { floating.chain(scrolling) } + pub fn tiles_with_ipc_layouts(&self) -> impl Iterator<Item = (&Tile<W>, WindowLayout)> { + let scrolling = self.scrolling.tiles_with_ipc_layouts(); + let floating = self.floating.tiles_with_ipc_layouts(); + floating.chain(scrolling) + } + pub fn active_tile_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> { if self.floating_is_active.get() { self.floating.active_tile_visual_rectangle() |
