Merge pull request #316 from binsoftware/cocoa-fixes
Cocoa fixes: memory leaks, monitor handling, is_current()
This commit is contained in:
commit
8a463f6643
7 changed files with 204 additions and 72 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue