Skip to content

Commit

Permalink
Support of MacOS 10.13 to appear soon: fix handling of window moves i…
Browse files Browse the repository at this point in the history
…n presence of subwindows.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Jul 14, 2017
1 parent 872406c commit a74cca3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Fl_cocoa.mm
Expand Up @@ -1317,7 +1317,13 @@ - (void)windowDidMove:(NSNotification *)notif
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();
}
Expand Down

0 comments on commit a74cca3

Please sign in to comment.