- I had to revert SVN fix 4386 which simplified Carbon clipping, but also introduced unwanted overwriting of subwindows. The current code is slower, but correct, and should still perform well enough if here are no subwindows.

For FLTK2, this is no issue since subwindows and subgroups are implemented without OS support.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4416 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-07-14 13:43:26 +00:00
parent 7f526e1362
commit e2504a0881
2 changed files with 26 additions and 0 deletions

View File

@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745)
- Reverted Mac Carbon Clipping simplification that broke
subwindow clipping (STR #908, SVN r4386)
- Fixed bitmap scaling code
- Fixed tiny memory leak (STR #878)
- Fixed hang on corrupt jpeg (STR #915)

View File

@ -452,11 +452,35 @@ void fl_restore_clip() {
#ifdef WIN32
SelectClipRgn(fl_gc, r); //if r is NULL, clip is automatically cleared
#elif defined(__APPLE_QD__)
# if 1
// This code is required to allow true subwindows to work on Mac.
// During regular operation however, this seems overkill.
// See also: Fl_Window::make_current()
if ( fl_window ) {
GrafPtr port = GetWindowPort( fl_window );
if ( port ) { // port will be NULL if we are using a GWorld (and fl_window_region is invalid)
RgnHandle portClip = NewRgn();
CopyRgn( fl_window_region, portClip ); // changed
if ( r )
SectRgn( portClip, r, portClip );
SetPortClipRegion( port, portClip );
DisposeRgn( portClip );
}
} else {
if (r)
SetClip(r);
else {
Rect rect; rect.left=0; rect.top=0; rect.right=0x7fff; rect.bottom=0x7fff;
ClipRect(&rect);
}
}
# else
if (r) SetClip(r);
else {
Rect rect; rect.left=0; rect.top=0; rect.right=0x7fff; rect.bottom=0x7fff;
ClipRect(&rect);
}
# endif
#elif defined(__APPLE_QUARTZ__)
if ( fl_window )
{