summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-14 19:58:28 +0000
committerManolo Gouy <Manolo>2017-07-14 19:58:28 +0000
commita74cca3219497690b577206066a0e87a957f3c87 (patch)
tree81ac944d67a6a4fa04dcfed0af7f9c0490d45277 /src
parent872406c871a440b5129dfd5b792ba0c983036d08 (diff)
Support of MacOS 10.13 to appear soon: fix handling of window moves in presence of subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index bcf53cbac..b97b032ac 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1317,7 +1317,13 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
if (parent && window->as_gl_window()) parent->redraw();
}
resize_from_system = NULL;
- [nsw recursivelySendToSubwindows:@selector(setSubwindowFrame)];
+ // before 10.13: OS sends windowDidMove to parent window only,
+ // FLTK recursively sends setSubwindowFrame to children,
+ // setSubwindowFrame sends setFrame, this triggers windowDidMove to child which sets child position.
+ //
+ // with 10.13: OS sends windowDidMove to parent window and then to children
+ // FLTK sets position of parent and children. setSubwindowFrame is no longer necessary.
+ if (fl_mac_os_version < 101300) [nsw recursivelySendToSubwindows:@selector(setSubwindowFrame)];
[nsw checkSubwindowFrame];
fl_unlock_function();
}