Skip to content

Commit

Permalink
Revert "Update raw-window-handle to 0.2 (rust-windowing#1191)"
Browse files Browse the repository at this point in the history
This reverts commit 18a0119.
  • Loading branch information
hecrj committed Oct 10, 2019
1 parent 1b82ce2 commit edc8280
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ lazy_static = "1"
libc = "0.2"
log = "0.4"
serde = { version = "1", optional = true, features = ["serde_derive"] }
raw-window-handle = "0.2"
raw-window-handle = "0.1"

[dev-dependencies]
image = "0.21"
Expand Down
10 changes: 0 additions & 10 deletions src/platform_impl/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use crate::{
CreationError, CursorIcon, Event, LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize,
WindowAttributes, WindowEvent, WindowId as RootWindowId,
};
use raw_window_handle::{android::AndroidHandle, RawWindowHandle};
use CreationError::OsError;

pub type OsError = std::io::Error;
Expand Down Expand Up @@ -422,15 +421,6 @@ impl Window {
pub fn id(&self) -> WindowId {
WindowId
}

#[inline]
pub fn raw_window_handle(&self) -> RawWindowHandle {
let handle = AndroidHandle {
a_native_window: self.native_window,
..WindowsHandle::empty()
};
RawWindowHandle::Android(handle)
}
}

unsafe impl Send for Window {}
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl Window {

pub fn raw_window_handle(&self) -> RawWindowHandle {
match self {
&Window::X(ref window) => RawWindowHandle::Xlib(window.raw_window_handle()),
&Window::X(ref window) => RawWindowHandle::X11(window.raw_window_handle()),
&Window::Wayland(ref window) => RawWindowHandle::Wayland(window.raw_window_handle()),
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/platform_impl/linux/x11/window.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use raw_window_handle::unix::XlibHandle;
use raw_window_handle::unix::X11Handle;
use std::{
cmp,
collections::HashSet,
Expand Down Expand Up @@ -1296,11 +1296,11 @@ impl UnownedWindow {
}

#[inline]
pub fn raw_window_handle(&self) -> XlibHandle {
XlibHandle {
pub fn raw_window_handle(&self) -> X11Handle {
X11Handle {
window: self.xwindow,
display: self.xconn.display as _,
..XlibHandle::empty()
..X11Handle::empty()
}
}
}

0 comments on commit edc8280

Please sign in to comment.