mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-23 10:26:34 +11:00
Unix fix attempt
This commit is contained in:
parent
148f507272
commit
5025db2d59
2 changed files with 8 additions and 8 deletions
|
@ -55,7 +55,7 @@ macro_rules! gen_api_transition {
|
|||
}
|
||||
|
||||
pub struct Window2 {
|
||||
window: ::std::sync::Arc<Window>,
|
||||
pub window: ::std::sync::Arc<Window>,
|
||||
events_loop: ::std::sync::Weak<EventsLoop>,
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ pub trait WindowExt {
|
|||
impl WindowExt for Window {
|
||||
#[inline]
|
||||
fn get_xlib_window(&self) -> Option<*mut libc::c_void> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::X(ref w) => Some(w.get_xlib_window()),
|
||||
_ => None
|
||||
}
|
||||
|
@ -94,28 +94,28 @@ impl WindowExt for Window {
|
|||
|
||||
#[inline]
|
||||
fn get_xlib_display(&self) -> Option<*mut libc::c_void> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::X(ref w) => Some(w.get_xlib_display()),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
fn get_xlib_screen_id(&self) -> Option<*mut libc::c_void> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::X(ref w) => Some(w.get_xlib_screen_id()),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
fn get_xlib_xconnection(&self) -> Option<Arc<XConnection>> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::X(ref w) => Some(w.get_xlib_xconnection()),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
fn get_xcb_connection(&self) -> Option<*mut libc::c_void> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::X(ref w) => Some(w.get_xcb_connection()),
|
||||
_ => None
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ impl WindowExt for Window {
|
|||
|
||||
#[inline]
|
||||
fn get_wayland_client_surface(&self) -> Option<&WlSurface> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::Wayland(ref w) => Some(w.get_surface()),
|
||||
_ => None
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ impl WindowExt for Window {
|
|||
|
||||
#[inline]
|
||||
fn get_wayland_client_display(&self) -> Option<&WlDisplay> {
|
||||
match self.window {
|
||||
match *self.window.window {
|
||||
LinuxWindow::Wayland(ref w) => Some(w.get_display()),
|
||||
_ => None
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue