mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
On X11, reload DPI on _XSETTINGS_SETTINGS
This also fixes the deadlock when such reload may happen. Fixes: #3383 Signed-off-by: John Nunley <dev@notgull.net> Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
This commit is contained in:
@@ -10,6 +10,7 @@ mod monitor;
|
||||
pub mod util;
|
||||
mod window;
|
||||
mod xdisplay;
|
||||
mod xsettings;
|
||||
|
||||
pub(crate) use self::{
|
||||
monitor::{MonitorHandle, VideoModeHandle},
|
||||
@@ -889,6 +890,9 @@ pub enum X11Error {
|
||||
|
||||
/// Could not find a matching X11 visual for this visualid
|
||||
NoSuchVisual(xproto::Visualid),
|
||||
|
||||
/// Unable to parse xsettings.
|
||||
XsettingsParse(xsettings::ParserError),
|
||||
}
|
||||
|
||||
impl fmt::Display for X11Error {
|
||||
@@ -913,6 +917,9 @@ impl fmt::Display for X11Error {
|
||||
visualid
|
||||
)
|
||||
}
|
||||
X11Error::XsettingsParse(err) => {
|
||||
write!(f, "Failed to parse xsettings: {:?}", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -981,6 +988,12 @@ impl From<ReplyOrIdError> for X11Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<xsettings::ParserError> for X11Error {
|
||||
fn from(value: xsettings::ParserError) -> Self {
|
||||
Self::XsettingsParse(value)
|
||||
}
|
||||
}
|
||||
|
||||
/// The underlying x11rb connection that we are using.
|
||||
type X11rbConnection = x11rb::xcb_ffi::XCBConnection;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user