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:
John Nunley 2023-08-29 14:01:25 -07:00 committed by GitHub
parent 0c8cf94a70
commit bb9b629bc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 399 additions and 394 deletions

View file

@ -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)
}
}