Simplify/deduplicate hot corner computation

This commit is contained in:
Ivan Molodetskikh
2025-08-21 09:14:23 +03:00
parent 0a8b4e036d
commit c9e85a0fe2
2 changed files with 16 additions and 27 deletions
+3
View File
@@ -528,6 +528,8 @@ pub struct PointContents {
pub window: Option<(Window, HitType)>,
// If surface belongs to a layer surface, this is that layer surface.
pub layer: Option<LayerSurface>,
// Pointer is over a hot corner.
pub hot_corner: bool,
}
#[derive(Debug, Default)]
@@ -3403,6 +3405,7 @@ impl Niri {
if !hot_corners.off {
let hot_corner = Rectangle::from_size(Size::from((1., 1.)));
if hot_corner.contains(pos_within_output) {
rv.hot_corner = true;
return rv;
}
}