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:
parent
db1ca45a17
commit
df8805c0d2
8 changed files with 439 additions and 19 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue