mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix crash in screenX and screenY getters returning negative values (#35235)
Instead of casting the window client rect to `u32`, keep it as `i32` and just cast the size dimensions to `u32`. Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
ad07db0b0c
commit
42b581a6f6
1 changed files with 3 additions and 3 deletions
|
@ -1849,10 +1849,10 @@ impl Window {
|
|||
.compositor_api
|
||||
.sender()
|
||||
.send(webrender_traits::CrossProcessCompositorMessage::GetClientWindowRect(send));
|
||||
let rect = recv.recv().unwrap_or_default().to_u32();
|
||||
let rect = recv.recv().unwrap_or_default();
|
||||
(
|
||||
Size2D::new(rect.size().width, rect.size().height),
|
||||
Point2D::new(rect.min.x as i32, rect.min.y as i32),
|
||||
Size2D::new(rect.size().width as u32, rect.size().height as u32),
|
||||
Point2D::new(rect.min.x, rect.min.y),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue