mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 13:20:06 -04:00
Merge pull request #316 from binsoftware/cocoa-fixes
Cocoa fixes: memory leaks, monitor handling, is_current()
This commit is contained in:
@@ -7,6 +7,7 @@ use CreationError;
|
||||
use Event;
|
||||
use GlRequest;
|
||||
use MouseCursor;
|
||||
use native_monitor::NativeMonitorId;
|
||||
|
||||
use gl_common;
|
||||
use libc;
|
||||
@@ -509,6 +510,12 @@ impl MonitorID {
|
||||
id.get_name()
|
||||
}
|
||||
|
||||
/// Returns the native platform identifier for this monitor.
|
||||
pub fn get_native_identifier(&self) -> NativeMonitorId {
|
||||
let &MonitorID(ref id) = self;
|
||||
id.get_native_identifier()
|
||||
}
|
||||
|
||||
/// Returns the number of pixels currently displayed on the monitor.
|
||||
pub fn get_dimensions(&self) -> (u32, u32) {
|
||||
let &MonitorID(ref id) = self;
|
||||
|
||||
Reference in New Issue
Block a user