From 3f64e2b28d3556a1ea316fe6ae73eabf454f1fa8 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 15 Apr 2016 11:30:10 +0000 Subject: Continue removing from class Fl_X what is not window-related. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11613 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index a0aa4121e..9720977e3 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1905,8 +1905,10 @@ int Fl_Cocoa_Screen_Driver::h() { } // computes the work area of the nth screen (screen #0 has the menubar) -void Fl_X::screen_work_area(int &X, int &Y, int &W, int &H, int n) +void Fl_Cocoa_Screen_Driver::screen_work_area(int &X, int &Y, int &W, int &H, int n) { + if (num_screens < 0) init(); + if (n < 0 || n >= num_screens) n = 0; fl_open_display(); NSRect r = [[[NSScreen screens] objectAtIndex:n] visibleFrame]; X = int(r.origin.x); -- cgit v1.2.3