diff --git a/src/shell/element/window.rs b/src/shell/element/window.rs index 821b4ae4..c01a6b18 100644 --- a/src/shell/element/window.rs +++ b/src/shell/element/window.rs @@ -221,7 +221,7 @@ where ) -> Vec { AsRenderElements::::render_elements::>( &self.window, - location - self.window.geometry().loc.to_physical_precise_round(scale), + location, scale, ) .into_iter() diff --git a/src/shell/layout/tiling/mod.rs b/src/shell/layout/tiling/mod.rs index 009b8b52..91a03aa9 100644 --- a/src/shell/layout/tiling/mod.rs +++ b/src/shell/layout/tiling/mod.rs @@ -16,7 +16,7 @@ use crate::{ use id_tree::{InsertBehavior, MoveBehavior, Node, NodeId, NodeIdError, RemoveBehavior, Tree}; use smithay::{ backend::renderer::{element::AsRenderElements, ImportAll, Renderer}, - desktop::{layer_map_for_output, Window}, + desktop::{layer_map_for_output, space::SpaceElement, Window}, input::{ pointer::{Focus, GrabStartData as PointerGrabStartData}, Seat, @@ -899,7 +899,6 @@ impl TilingLayout { ::TextureId: 'static, { let output_scale = output.current_scale().fractional_scale(); - let int_scale = output.current_scale().integer_scale(); if !self.trees.contains_key(output) { return Err(OutputNotMapped); @@ -916,7 +915,11 @@ impl TilingLayout { }) .flat_map(|(mapped, loc)| { mapped.render_elements::>( - loc.to_physical(int_scale), + loc.to_physical_precise_round(output_scale) + - mapped + .geometry() + .loc + .to_physical_precise_round(output_scale), Scale::from(output_scale), ) }) diff --git a/src/shell/workspace.rs b/src/shell/workspace.rs index 00271300..1285a96a 100644 --- a/src/shell/workspace.rs +++ b/src/shell/workspace.rs @@ -128,10 +128,10 @@ impl Workspace { .element_under(location) .or_else(|| { self.tiling_layer.mapped().find_map(|(_, mapped, loc)| { - let test_point = location - loc.to_f64(); + let test_point = location - loc.to_f64() + mapped.geometry().loc.to_f64(); mapped .is_in_input_region(&test_point) - .then_some((mapped, loc)) + .then_some((mapped, loc - mapped.geometry().loc)) }) }) }