mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-23 10:26:34 +11:00
Fix use-after-free in XConnection::get_output_info (#1211)
This commit is contained in:
parent
42e0ccfa1c
commit
2d41a7d1b0
2 changed files with 4 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
||||||
- Removed `derivative` crate dependency.
|
- Removed `derivative` crate dependency.
|
||||||
- On Wayland, add support for set_cursor_icon.
|
- On Wayland, add support for set_cursor_icon.
|
||||||
- Use `impl Iterator<Item = MonitorHandle>` instead of `AvailableMonitorsIter` consistently.
|
- Use `impl Iterator<Item = MonitorHandle>` instead of `AvailableMonitorsIter` consistently.
|
||||||
|
- On X11, fix use-after-free during window creation
|
||||||
|
|
||||||
# 0.20.0 Alpha 3 (2019-08-14)
|
# 0.20.0 Alpha 3 (2019-08-14)
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,8 @@ impl XConnection {
|
||||||
// video mode is returned to the user
|
// video mode is returned to the user
|
||||||
monitor: None,
|
monitor: None,
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
.collect();
|
||||||
|
|
||||||
let name_slice = slice::from_raw_parts(
|
let name_slice = slice::from_raw_parts(
|
||||||
(*output_info).name as *mut u8,
|
(*output_info).name as *mut u8,
|
||||||
|
@ -119,7 +120,7 @@ impl XConnection {
|
||||||
};
|
};
|
||||||
|
|
||||||
(self.xrandr.XRRFreeOutputInfo)(output_info);
|
(self.xrandr.XRRFreeOutputInfo)(output_info);
|
||||||
Some((name, hidpi_factor, modes.collect()))
|
Some((name, hidpi_factor, modes))
|
||||||
}
|
}
|
||||||
pub fn set_crtc_config(&self, crtc_id: RRCrtc, mode_id: RRMode) -> Result<(), ()> {
|
pub fn set_crtc_config(&self, crtc_id: RRCrtc, mode_id: RRMode) -> Result<(), ()> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Add table
Reference in a new issue