fix: wayland controlled side, cursor misalignment (#13537)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-11-18 00:37:15 +08:00
committed by GitHub
parent a6571e71e4
commit b2dff336ce
22 changed files with 1241 additions and 187 deletions

View File

@@ -88,6 +88,27 @@ impl Display {
}
}
pub fn scale(&self) -> f64 {
match self {
Display::X11(_d) => 1.0,
Display::WAYLAND(d) => d.scale(),
}
}
pub fn logical_width(&self) -> usize {
match self {
Display::X11(d) => d.width(),
Display::WAYLAND(d) => d.logical_width(),
}
}
pub fn logical_height(&self) -> usize {
match self {
Display::X11(d) => d.height(),
Display::WAYLAND(d) => d.logical_height(),
}
}
pub fn origin(&self) -> (i32, i32) {
match self {
Display::X11(d) => d.origin(),