mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
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:
@@ -4,7 +4,6 @@ use libc;
|
||||
|
||||
use WindowAttributes;
|
||||
use FullScreenState;
|
||||
use native_monitor::NativeMonitorId;
|
||||
use os::macos::ActivationPolicy;
|
||||
use os::macos::WindowExt;
|
||||
|
||||
@@ -386,10 +385,7 @@ impl Window {
|
||||
unsafe {
|
||||
let screen = match attrs.fullscreen {
|
||||
FullScreenState::Exclusive(ref monitor_id) => {
|
||||
let native_id = match monitor_id.get_native_identifier() {
|
||||
NativeMonitorId::Numeric(num) => num,
|
||||
_ => panic!("OS X monitors should always have a numeric native ID")
|
||||
};
|
||||
let native_id = monitor_id.inner.get_native_identifier();
|
||||
let matching_screen = {
|
||||
let screens = appkit::NSScreen::screens(nil);
|
||||
let count: NSUInteger = msg_send![screens, count];
|
||||
|
||||
Reference in New Issue
Block a user