summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-12-09 12:52:17 +0000
committerManolo Gouy <Manolo>2015-12-09 12:52:17 +0000
commit8d1d2df0c2088c14de281e60b2694bc4352ef63d (patch)
tree2fd217aa5d63606ca1756921e27e4228131b9c0b /src
parentc7950b30c4df75e4f7b0a99ea9c3a8deda8b0c64 (diff)
Mac OS: using true system windows for FLTK sub-Fl_Window's.
Improved handling of the situations where a subwindow is created, hidden, the parent window resized, and the subwindow shown, with a new size. This change no longer sends setFrame: or setFrameOrigin: messages to hidden subwindows. Instead, subwindows acquire their correct size and position when they are shown again and Fl_X::map() is called. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10954 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index ab6652f96..5f0c32f0e 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -735,7 +735,7 @@ void Fl::remove_timeout(Fl_Timeout_Handler cb, void* data)
if (!NSEqualRects(rp, [self frame])) {
[self setFrame:rp display:YES];
}
- if (w->visible_r() && ![self parentWindow]) {
+ if (![self parentWindow]) {
[pxid addChildWindow:self ordered:NSWindowAbove]; // needs OS X 10.2
[self orderWindow:NSWindowAbove relativeTo:[pxid windowNumber]]; // necessary under 10.3
}
@@ -3236,7 +3236,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
parent = parent->window();
}
NSRect r = NSMakeRect(bx, main_screen_height - (by + H), W, H + (border()?bt:0));
- [fl_xid(this) setFrame:r display:YES];
+ if (visible_r()) [fl_xid(this) setFrame:r display:YES];
} else {
bx = X; by = Y;
parent = window();
@@ -3246,7 +3246,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
parent = parent->window();
}
NSPoint pt = NSMakePoint(bx, main_screen_height - (by + H));
- [fl_xid(this) setFrameOrigin:pt]; // set cocoa coords to FLTK position
+ if (visible_r()) [fl_xid(this) setFrameOrigin:pt]; // set cocoa coords to FLTK position
}
}
else {