stack: Fix mouse offset on windows with non-zero geometry

This commit is contained in:
Victoria Brekenfeld 2024-01-08 21:23:51 +00:00 committed by Victoria Brekenfeld
parent b762ea1852
commit db09b4d364

View file

@ -918,7 +918,12 @@ impl SpaceElement for CosmicStack {
}
fn is_in_input_region(&self, point: &Point<f64, Logical>) -> bool {
let mut point = *point;
if point.y < TAB_HEIGHT as f64 {
let offset = self.0.with_program(|p| {
p.windows.lock().unwrap()[p.active.load(Ordering::SeqCst)]
.geometry()
.loc
});
if (point.y.round() as i32 - offset.y) < TAB_HEIGHT {
return true;
}
point.y -= TAB_HEIGHT as f64;