From 0215c7986c4f255d92753daddc0237f4e5a1a73b Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 20 Dec 2001 05:27:14 +0000 Subject: fixed iBook keyboard bug. all message handling now in Carbon. mouse capture support added. timer support added. overlay support added. getting there... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1881 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_rect.cxx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/fl_rect.cxx') diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx index 3d55405e1..5675961ca 100644 --- a/src/fl_rect.cxx +++ b/src/fl_rect.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_rect.cxx,v 1.10.2.4.2.5 2001/12/18 00:24:01 matthiaswm Exp $" +// "$Id: fl_rect.cxx,v 1.10.2.4.2.6 2001/12/20 05:27:14 matthiaswm Exp $" // // Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // @@ -340,14 +340,17 @@ void fl_restore_clip() { SelectClipRgn(fl_gc, r); //if r is NULL, clip is automatically cleared #elif defined(__APPLE__) # if 1 - 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 ); + 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); @@ -500,5 +503,5 @@ int fl_clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){ } // -// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.5 2001/12/18 00:24:01 matthiaswm Exp $". +// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.6 2001/12/20 05:27:14 matthiaswm Exp $". // -- cgit v1.2.3