summaryrefslogtreecommitdiff
path: root/src/fl_rect.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2001-12-20 05:27:14 +0000
committerMatthias Melcher <fltk@matthiasm.com>2001-12-20 05:27:14 +0000
commit0215c7986c4f255d92753daddc0237f4e5a1a73b (patch)
treee8336ab8128abcf99ce47b9b860f151ab036ce96 /src/fl_rect.cxx
parenta2e149d132ff949db2282c9ae0e1d65bd9c16a35 (diff)
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
Diffstat (limited to 'src/fl_rect.cxx')
-rw-r--r--src/fl_rect.cxx23
1 files changed, 13 insertions, 10 deletions
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 $".
//