From 2dd9d06818fda6c300d2e35561785612b25b149f Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 22 Sep 2015 05:43:37 +0000 Subject: Make sure the FLTK and the system keep their representations of window coordinates synchronized. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index a6c4c2dc2..b7e5218c6 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2992,6 +2992,9 @@ void Fl_X::make(Fl_Window* w) static NSPoint delta = NSZeroPoint; delta = [cw cascadeTopLeftFromPoint:delta]; } + crect = [cw frame]; // synchronize FLTK's and the system's window coordinates + w->x(int(crect.origin.x)); + w->y(int(main_screen_height - (crect.origin.y + w->h()))); } if(w->menu_window()) { // make menu windows slightly transparent [cw setAlphaValue:0.97]; -- cgit v1.2.3