summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_cocoa.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index c42b4432a..e5977ed85 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1927,7 +1927,8 @@ static void get_window_frame_sizes(int &bx, int &by, int &bt, Fl_Window *win) {
* smallest x coordinate in screen space of work area of menubar-containing display
*/
int Fl_Cocoa_Screen_Driver::x() {
- return int([[[NSScreen screens] objectAtIndex:0] visibleFrame].origin.x);
+ open_display();
+ return int([[[NSScreen screens] objectAtIndex:0] visibleFrame].origin.x) / scale(0);
}