login greeter
git clone https://git.lucas.co/cce-display-manager.git
fix: scale pointer event coordinates into layout space coordinates
src/main.rs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 844c355..e017baf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -944,8 +944,9 @@ impl PointerHandler for AppState {
for event in events {
let (x, y) = event.position;
if let Some(state) = &mut self.state {
- state.cursor_x = x as f32;
- state.cursor_y = y as f32;
+ let ratio = state.compositor_scale / state.scale;
+ state.cursor_x = (x * ratio) as f32;
+ state.cursor_y = (y * ratio) as f32;
}
match &event.kind {