summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-10-07 10:50:13 +0000
committerManolo Gouy <Manolo>2010-10-07 10:50:13 +0000
commit9f8bbb2a115cdfc9489e469ee3eedb36d9f048ba (patch)
tree65bfeeb49dd662075a3d8106a93f42e71c1b4d0a /src
parent56c6a5b12a391ea1cc3e3cedee5804f59a4b16ea (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm10
1 files changed, 4 insertions, 6 deletions
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;
}