summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-12-11 20:09:55 +0000
committerManolo Gouy <Manolo>2014-12-11 20:09:55 +0000
commit879a8fbabf17e95f6235dd21441dff2c168872cf (patch)
tree4ef5b2e072fb2c8ce67366b1285932988e779df3 /src
parent68a577e1f6cdb6fd1a60a2fff5ceb591fb53256a (diff)
Propagate Fl_X::mapped_to_retina value from parent to subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10482 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 01a2d9cb8..23b630c35 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1106,6 +1106,7 @@ static void position_subwindows(Fl_Window *parent, BOOL is_a_move)
while ((child = [enumerator nextObject]) != nil) {
NSRect rchild;
Fl_Window *sub = [child getFl_Window];
+ Fl_X::i(sub)->mapped_to_retina = Fl_X::i(parent)->mapped_to_retina;
rchild.origin = NSMakePoint(pframe.origin.x + sub->x(), pframe.origin.y + parent->h() - (sub->h() + sub->y()));
rchild.size = NSMakeSize(sub->w(), sub->h());
[child setFrame:rchild display:YES];
@@ -1190,7 +1191,6 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
update_e_xy_and_e_xy_root(nsw);
resize_from_system = NULL;
window->position((int)pt2.x, (int)(main_screen_height - pt2.y));
- position_subwindows(window, YES);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
if (fl_mac_os_version >= 100700) { // determine whether window is now mapped to a retina display
bool *mapped = &(Fl_X::i(window)->mapped_to_retina);
@@ -1201,6 +1201,7 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
if ((!previous) && *mapped) window->redraw();
}
#endif
+ position_subwindows(window, YES);
}
fl_unlock_function();
}
@@ -2681,8 +2682,9 @@ void Fl_X::make(Fl_Window* w)
x->subRect = 0;
x->cursor = NULL;
x->gc = 0;
- x->mapped_to_retina = false;
-
+ if (w->parent()) x->mapped_to_retina = w->top_window()->i->mapped_to_retina;
+ else x->mapped_to_retina = false;
+
NSRect crect;
if (w->fullscreen_active()) {
int top, bottom, left, right;