diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 14:30:19 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-12-24 14:30:19 +0400 |
| commit | 461ce5f3631c99e928280935d92f084f4b641b9e (patch) | |
| tree | 3bd2e302b30956f4c4a96dfff8475922d993ddde /src/layout/mod.rs | |
| parent | 624c799ebf4470ca6dfc80592029132071730c57 (diff) | |
| download | niri-461ce5f3631c99e928280935d92f084f4b641b9e.tar.gz niri-461ce5f3631c99e928280935d92f084f4b641b9e.tar.bz2 niri-461ce5f3631c99e928280935d92f084f4b641b9e.zip | |
Move output_size to utils
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index bf012311..8946ffd0 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -57,6 +57,7 @@ use smithay::wayland::shell::xdg::SurfaceCachedState; use crate::animation::Animation; use crate::config::{self, Color, Config, PresetWidth, SizeChange, Struts}; +use crate::utils::output_size; #[derive(Debug, Clone, PartialEq, Eq)] pub struct OutputId(String); @@ -3264,16 +3265,6 @@ impl<W: LayoutElement> Column<W> { } } -pub fn output_size(output: &Output) -> Size<i32, Logical> { - let output_scale = output.current_scale().integer_scale(); - let output_transform = output.current_transform(); - let output_mode = output.current_mode().unwrap(); - - output_transform - .transform_size(output_mode.size) - .to_logical(output_scale) -} - fn compute_working_area(output: &Output, struts: Struts) -> Rectangle<i32, Logical> { // Start with the layer-shell non-exclusive zone. let mut working_area = layer_map_for_output(output).non_exclusive_zone(); |
