mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
Implement X11 extensions using x11rb instead of Xlib
Removes Xlib code by replacing it with the x11rb equivalent, the commit handles xrandr, xinput, xinput2, and xkb. Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
@@ -851,6 +851,7 @@ impl<T> EventLoopWindowTarget<T> {
|
||||
.x_connection()
|
||||
.available_monitors()
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.map(MonitorHandle::X)
|
||||
.collect(),
|
||||
}
|
||||
@@ -863,7 +864,7 @@ impl<T> EventLoopWindowTarget<T> {
|
||||
EventLoopWindowTarget::Wayland(ref evlp) => evlp.primary_monitor(),
|
||||
#[cfg(x11_platform)]
|
||||
EventLoopWindowTarget::X(ref evlp) => {
|
||||
let primary_monitor = MonitorHandle::X(evlp.x_connection().primary_monitor());
|
||||
let primary_monitor = MonitorHandle::X(evlp.x_connection().primary_monitor().ok()?);
|
||||
Some(primary_monitor)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user