Author: manolo
Date: 2012-06-14 05:45:04 -0700 (Thu, 14 Jun 2012)
New Revision: 9603
Log:
Mac OS: added necessary fl_open_display() in fltk3::y() and
Fl_X::screen_work_area() functions.
Modified:
branches/branch-3.0/src/fltk3/cocoa.mm
Modified: branches/branch-3.0/src/fltk3/cocoa.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoa.mm 2012-06-14 12:41:19 UTC (rev
9602)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2012-06-14 12:45:04 UTC (rev
9603)
@@ -1301,6 +1301,7 @@
* smallest y coordinate in screen space of work area of menubar-containing
display
*/
int fltk3::y() {
+ fl_open_display();
NSRect visible = [[[NSScreen screens] objectAtIndex:0] visibleFrame];
return int(main_screen_height - (visible.origin.y + visible.size.height));
}
@@ -1324,6 +1325,7 @@
// 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)
{
+ 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);
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit