diff options
| author | Manolo Gouy <Manolo> | 2015-01-23 10:14:09 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-01-23 10:14:09 +0000 |
| commit | 6f022c4d953df2b35c3a30d2095fc4e677d2484d (patch) | |
| tree | 4135d9a1a772a7144d802c1e85ec3f54598a4b45 /src | |
| parent | 2d264fa8d544de417b60a6fcb37352d2687dde7e (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 6 |
1 files changed, 5 insertions, 1 deletions
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); } } } |
