It is necessary to call fl_cgrectmake_cocoa() when building the clipping rectangle for a sub-window,

as for any clipping rectangle.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10532 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2015-01-23 10:14:09 +00:00
parent 2d264fa8d5
commit 6f022c4d95

View File

@ -3173,7 +3173,11 @@ void Fl_Window::resize(int X,int Y,int W,int H) {
if (!CGRectEqualToRect(srect, current_clip)) { // if new clip differs from current clip
delete r;
[[i->xid contentView] setNeedsDisplay:YES]; // subwindow needs redrawn
i->subRect( ( CGRectEqualToRect(srect, full) ? NULL : new CGRect(srect) ) );
if (CGRectEqualToRect(srect, full)) r = NULL;
else {
r = new CGRect(fl_cgrectmake_cocoa(srect.origin.x, srect.origin.y, srect.size.width, srect.size.height));
}
i->subRect(r);
}
}
}