Use cfg aliases throught the code base

Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
Amr Bashir 2022-12-25 09:57:27 +02:00 committed by GitHub
parent 58ec458877
commit 5e77d70245
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 185 additions and 227 deletions

View file

@ -60,7 +60,7 @@ impl<T> EventLoopWindowTargetExtX11 for EventLoopWindowTarget<T> {
fn xlib_xconnection(&self) -> Option<Arc<XConnection>> {
match self.p {
LinuxEventLoopWindowTarget::X(ref e) => Some(e.x_connection().clone()),
#[cfg(feature = "wayland")]
#[cfg(wayland_platform)]
_ => None,
}
}
@ -124,7 +124,7 @@ impl WindowExtX11 for Window {
fn xlib_window(&self) -> Option<raw::c_ulong> {
match self.window {
LinuxWindow::X(ref w) => Some(w.xlib_window()),
#[cfg(feature = "wayland")]
#[cfg(wayland_platform)]
_ => None,
}
}
@ -133,7 +133,7 @@ impl WindowExtX11 for Window {
fn xlib_display(&self) -> Option<*mut raw::c_void> {
match self.window {
LinuxWindow::X(ref w) => Some(w.xlib_display()),
#[cfg(feature = "wayland")]
#[cfg(wayland_platform)]
_ => None,
}
}
@ -142,7 +142,7 @@ impl WindowExtX11 for Window {
fn xlib_screen_id(&self) -> Option<raw::c_int> {
match self.window {
LinuxWindow::X(ref w) => Some(w.xlib_screen_id()),
#[cfg(feature = "wayland")]
#[cfg(wayland_platform)]
_ => None,
}
}
@ -151,7 +151,7 @@ impl WindowExtX11 for Window {
fn xlib_xconnection(&self) -> Option<Arc<XConnection>> {
match self.window {
LinuxWindow::X(ref w) => Some(w.xlib_xconnection()),
#[cfg(feature = "wayland")]
#[cfg(wayland_platform)]
_ => None,
}
}
@ -160,7 +160,7 @@ impl WindowExtX11 for Window {
fn xcb_connection(&self) -> Option<*mut raw::c_void> {
match self.window {
LinuxWindow::X(ref w) => Some(w.xcb_connection()),
#[cfg(feature = "wayland")]
#[cfg(wayland_platform)]
_ => None,
}
}