chore: Prepare for Rust edition bump to 2024 (without autofix) (#27791)
Successor to #27779 - in this PR I've applied changes manually, without futzing with if let lifetimes at all. Release Notes: - N/A
This commit is contained in:
@@ -186,12 +186,15 @@ fn find_visuals(xcb: &XCBConnection, screen_index: usize) -> VisualSet {
|
||||
colormap: 0,
|
||||
depth: depth_info.depth,
|
||||
};
|
||||
log::debug!("Visual id: {}, class: {:?}, depth: {}, bits_per_value: {}, masks: 0x{:x} 0x{:x} 0x{:x}",
|
||||
log::debug!(
|
||||
"Visual id: {}, class: {:?}, depth: {}, bits_per_value: {}, masks: 0x{:x} 0x{:x} 0x{:x}",
|
||||
visual_type.visual_id,
|
||||
visual_type.class,
|
||||
depth_info.depth,
|
||||
visual_type.bits_per_rgb_value,
|
||||
visual_type.red_mask, visual_type.green_mask, visual_type.blue_mask,
|
||||
visual_type.red_mask,
|
||||
visual_type.green_mask,
|
||||
visual_type.blue_mask,
|
||||
);
|
||||
|
||||
if (
|
||||
@@ -409,15 +412,27 @@ impl X11WindowState {
|
||||
|
||||
let mut bounds = params.bounds.to_device_pixels(scale_factor);
|
||||
if bounds.size.width.0 == 0 || bounds.size.height.0 == 0 {
|
||||
log::warn!("Window bounds contain a zero value. height={}, width={}. Falling back to defaults.", bounds.size.height.0, bounds.size.width.0);
|
||||
log::warn!(
|
||||
"Window bounds contain a zero value. height={}, width={}. Falling back to defaults.",
|
||||
bounds.size.height.0,
|
||||
bounds.size.width.0
|
||||
);
|
||||
bounds.size.width = 800.into();
|
||||
bounds.size.height = 600.into();
|
||||
}
|
||||
|
||||
check_reply(
|
||||
|| {
|
||||
format!("X11 CreateWindow failed. depth: {}, x_window: {}, visual_set.root: {}, bounds.origin.x.0: {}, bounds.origin.y.0: {}, bounds.size.width.0: {}, bounds.size.height.0: {}",
|
||||
visual.depth, x_window, visual_set.root, bounds.origin.x.0 + 2, bounds.origin.y.0, bounds.size.width.0, bounds.size.height.0)
|
||||
format!(
|
||||
"X11 CreateWindow failed. depth: {}, x_window: {}, visual_set.root: {}, bounds.origin.x.0: {}, bounds.origin.y.0: {}, bounds.size.width.0: {}, bounds.size.height.0: {}",
|
||||
visual.depth,
|
||||
x_window,
|
||||
visual_set.root,
|
||||
bounds.origin.x.0 + 2,
|
||||
bounds.origin.y.0,
|
||||
bounds.size.width.0,
|
||||
bounds.size.height.0
|
||||
)
|
||||
},
|
||||
xcb.create_window(
|
||||
visual.depth,
|
||||
|
||||
Reference in New Issue
Block a user