From 9f8bbb2a115cdfc9489e469ee3eedb36d9f048ba Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 7 Oct 2010 10:50:13 +0000 Subject: Correctly account for position of dock in Fl::x() and Fl::h() functions git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 6f4baaab0..2c0770d43 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1624,7 +1624,7 @@ static void get_window_frame_sizes(int &bx, int &by, int &bt) { * smallest x ccordinate in screen space */ int Fl::x() { - return [[NSScreen mainScreen] frame].origin.x; + return [[NSScreen mainScreen] visibleFrame].origin.x; } @@ -1639,7 +1639,7 @@ int Fl::y() { /* - * screen width (single monitor!?) + * screen width */ int Fl::w() { return [[NSScreen mainScreen] visibleFrame].size.width; @@ -1647,12 +1647,10 @@ int Fl::w() { /* - * screen height (single monitor!?) + * screen height */ int Fl::h() { - int bx, by, bt; - get_window_frame_sizes(bx, by, bt); - return [[NSScreen mainScreen] frame].size.height - bt; + return [[NSScreen mainScreen] visibleFrame].size.height; } -- cgit v1.2.3