diff options
| author | Manolo Gouy <Manolo> | 2012-06-14 12:41:19 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2012-06-14 12:41:19 +0000 |
| commit | c0e01b24daaf2308c16efc62195d53f5645afba8 (patch) | |
| tree | 171094b19faa274713cb47eb656dea2df8ac5bea /src | |
| parent | 25bfd177efea15b61fa3b6500544cbb15fa0570f (diff) | |
Mac OS: added necessary fl_open_display() in Fl::y() and Fl_X::screen_work_area() functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9602 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 99311c8eb..ae3efea5d 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1324,6 +1324,7 @@ int Fl::x() { * smallest y coordinate in screen space of work area of menubar-containing display */ int Fl::y() { + fl_open_display(); NSRect visible = [[[NSScreen screens] objectAtIndex:0] visibleFrame]; return int(main_screen_height - (visible.origin.y + visible.size.height)); } @@ -1347,11 +1348,12 @@ int Fl::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) { - NSRect r = [[[NSScreen screens] objectAtIndex:n] visibleFrame]; - X = int(r.origin.x); - Y = main_screen_height - int(r.origin.y + r.size.height); - W = int(r.size.width); - H = int(r.size.height); + fl_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); + W = int(r.size.width); + H = int(r.size.height); } /* |
