mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Move output_size to utils
This commit is contained in:
+1
-10
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user