@@ -28,8 +28,7 @@ use x11rb::{
};
use std::{
- cell::RefCell, ffi::c_void, fmt::Display, num::NonZeroU32, ops::Div, ptr::NonNull, rc::Rc,
- sync::Arc,
+ cell::RefCell, ffi::c_void, fmt::Display, num::NonZeroU32, ptr::NonNull, rc::Rc, sync::Arc,
};
use super::{X11Display, XINPUT_ALL_DEVICE_GROUPS, XINPUT_ALL_DEVICES};
@@ -1264,12 +1263,10 @@ impl PlatformWindow for X11Window {
}
fn content_size(&self) -> Size<Pixels> {
- // We divide by the scale factor here because this value is queried to determine how much to draw,
- // but it will be multiplied later by the scale to adjust for scaling.
- let state = self.0.state.borrow();
- state
- .content_size()
- .map(|size| size.div(state.scale_factor))
+ // After the wgpu migration, X11WindowState::content_size() returns logical pixels
+ // (bounds.size is already divided by scale_factor in set_bounds), so no further
+ // division is needed here. This matches the Wayland implementation.
+ self.0.state.borrow().content_size()
}
fn resize(&mut self, size: Size<Pixels>) {