Move output_size to utils

This commit is contained in:
Ivan Molodetskikh
2023-12-24 14:30:19 +04:00
parent 624c799ebf
commit 461ce5f363
4 changed files with 18 additions and 14 deletions
+1 -10
View File
@@ -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();