From 6f022c4d953df2b35c3a30d2095fc4e677d2484d Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 23 Jan 2015 10:14:09 +0000 Subject: 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 --- src/Fl_cocoa.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index e237d93a4..3d8e5d206 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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); } } } -- cgit v1.2.3