Rework MonitorId::get_native_identifier (#267)
* Rework MonitorId::get_native_identifier * Try fix compilation * Returns the monitor ID on wayland as well * Try fix compilation * Fix iOS compilation
This commit is contained in:
parent
f7a8bcddb8
commit
7dc6fcdedc
16 changed files with 67 additions and 69 deletions
|
|
@ -3,6 +3,7 @@
|
|||
use std::sync::Arc;
|
||||
use std::ptr;
|
||||
use libc;
|
||||
use MonitorId;
|
||||
use Window;
|
||||
use platform::Window2 as LinuxWindow;
|
||||
use platform::{UnixBackend, UNIX_BACKEND};
|
||||
|
|
@ -148,3 +149,16 @@ impl WindowBuilderExt for WindowBuilder {
|
|||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Additional methods on `MonitorId` that are specific to Linux.
|
||||
pub trait MonitorIdExt {
|
||||
/// Returns the inner identifier of the monitor.
|
||||
fn native_id(&self) -> u32;
|
||||
}
|
||||
|
||||
impl MonitorIdExt for MonitorId {
|
||||
#[inline]
|
||||
fn native_id(&self) -> u32 {
|
||||
self.inner.get_native_identifier()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue