diff options
| author | Manolo Gouy <Manolo> | 2014-11-13 15:33:33 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-11-13 15:33:33 +0000 |
| commit | 43989ec606db056c82d113ad998ae285b5d4f8c4 (patch) | |
| tree | 5478ac489111acb3c75d13eda4ed7327999c800d /src | |
| parent | d2072c818c2a297c9cabb16eb1e98755a6d6fc5f (diff) | |
Support for true subwindows under Mac OS X (cont’d).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10454 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 7a209985f..be236011e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2611,6 +2611,8 @@ static void set_subwindow_frame(Fl_Window *w) { // maps a subwindow at its corre rp.size = NSMakeSize(w->w(), w->h()); if (!NSEqualRects(rp, [xid frame])) { [xid setFrame:rp display:YES]; + } + if (![xid parentWindow]) { [pxid addChildWindow:xid ordered:NSWindowAbove]; // needs OS X 10.2 [xid orderWindow:NSWindowAbove relativeTo:[pxid windowNumber]]; // necessary under 10.3 } @@ -2913,7 +2915,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) { size_range(W, H, W, H); } Fl_Group::resize(X,Y,W,H); - if (parent()) set_subwindow_frame(this); + if ([i->xid parentWindow]) set_subwindow_frame(this); // make sure that subwindows of this window don't leak out of their parent window NSArray *children = [fl_xid(this) childWindows]; // 10.2 NSEnumerator *enumerator = [children objectEnumerator]; |
