mirror of
https://github.com/fltk/fltk.git
synced 2026-05-20 22:36:19 +08:00
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
This commit is contained in:
+3
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user