Fix issues where screen and window sizes contained Pixels, but were declared as DevicePixels (#12991)
On most platforms, things were working correctly, but had the wrong type. On X11, there were some problems with window and display size calculations. Release Notes: - Fixed issues with window positioning on X11 --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
22dc88ed3d
commit
da281d6d8f
25 changed files with 331 additions and 367 deletions
|
@ -908,8 +908,11 @@ impl LinuxClient for X11Client {
|
|||
.iter()
|
||||
.enumerate()
|
||||
.filter_map(|(root_id, _)| {
|
||||
Some(Rc::new(X11Display::new(&state.xcb_connection, root_id)?)
|
||||
as Rc<dyn PlatformDisplay>)
|
||||
Some(Rc::new(X11Display::new(
|
||||
&state.xcb_connection,
|
||||
state.scale_factor,
|
||||
root_id,
|
||||
)?) as Rc<dyn PlatformDisplay>)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
@ -918,8 +921,12 @@ impl LinuxClient for X11Client {
|
|||
let state = self.0.borrow();
|
||||
|
||||
Some(Rc::new(
|
||||
X11Display::new(&state.xcb_connection, state.x_root_index)
|
||||
.expect("There should always be a root index"),
|
||||
X11Display::new(
|
||||
&state.xcb_connection,
|
||||
state.scale_factor,
|
||||
state.x_root_index,
|
||||
)
|
||||
.expect("There should always be a root index"),
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -928,6 +935,7 @@ impl LinuxClient for X11Client {
|
|||
|
||||
Some(Rc::new(X11Display::new(
|
||||
&state.xcb_connection,
|
||||
state.scale_factor,
|
||||
id.0 as usize,
|
||||
)?))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue