diff options
| author | Manolo Gouy <Manolo> | 2016-04-15 15:36:10 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-15 15:36:10 +0000 |
| commit | 2fcb4f419217eb2895ad0e52b15aab252eb827ef (patch) | |
| tree | 20d7a4148e4454df0cfd9389afd6e57565291781 /src/Fl_cocoa.mm | |
| parent | 15715cd89856140e70dfcdaf97b70d8f06d96e2b (diff) | |
Move platform-dependent implementations of fl_open/close_display() to the Fl_Screen_Driver class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index faf59a8b4..9d3291220 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1721,7 +1721,7 @@ void fl_open_callback(void (*cb)(const char *)) { } */ -void fl_open_display() { +void Fl_Cocoa_Screen_Driver::open_display() { static char beenHereDoneThat = 0; if ( !beenHereDoneThat ) { beenHereDoneThat = 1; @@ -1797,12 +1797,6 @@ void fl_open_display() { } -/* - * get rid of allocated resources - */ -void fl_close_display() { -} - // Force a "Roman" or "ASCII" keyboard, which both the Mozilla and // Safari people seem to think implies turning off advanced IME stuff // (see nsTSMManager::SyncKeyScript in Mozilla and enableSecureTextInput @@ -1883,7 +1877,7 @@ int Fl_Cocoa_Screen_Driver::x() { * smallest y coordinate in screen space of work area of menubar-containing display */ int Fl_Cocoa_Screen_Driver::y() { - fl_open_display(); + open_display(); NSRect visible = [[[NSScreen screens] objectAtIndex:0] visibleFrame]; return int(main_screen_height - (visible.origin.y + visible.size.height)); } @@ -1909,7 +1903,7 @@ void Fl_Cocoa_Screen_Driver::screen_work_area(int &X, int &Y, int &W, int &H, in { if (num_screens < 0) init(); if (n < 0 || n >= num_screens) n = 0; - fl_open_display(); + open_display(); NSRect r = [[[NSScreen screens] objectAtIndex:n] visibleFrame]; X = int(r.origin.x); Y = main_screen_height - int(r.origin.y + r.size.height); @@ -1922,7 +1916,7 @@ void Fl_Cocoa_Screen_Driver::screen_work_area(int &X, int &Y, int &W, int &H, in */ void Fl_Cocoa_Screen_Driver::get_mouse(int &x, int &y) { - fl_open_display(); + open_display(); NSPoint pt = [NSEvent mouseLocation]; x = int(pt.x); y = int(main_screen_height - pt.y); |
