Merge pull request #6502 from sahilyeole/fix/wayland_distorted_stream_scaling

Fix: wayland cursor mismatch on fractional scaling
This commit is contained in:
RustDesk
2023-11-23 09:54:04 +08:00
committed by GitHub

View File

@@ -175,7 +175,12 @@ pub(super) async fn check_init() -> ResultType<()> {
.trim_end_matches(",")
.parse()
.unwrap_or(origin.1 + height as i32);
(w, h)
if w < origin.0 + width as i32 || h < origin.1 + height as i32 {
(origin.0 + width as i32, origin.1 + height as i32)
}
else{
(w, h)
}
}
_ => (origin.0 + width as i32, origin.1 + height as i32),
};