summaryrefslogtreecommitdiff
path: root/src/fl_rect.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2001-12-18 00:24:01 +0000
committerMatthias Melcher <fltk@matthiasm.com>2001-12-18 00:24:01 +0000
commit502875252232cfc7afb47040701b7871c1431f2c (patch)
treef052a111e28d91e6832420adac15398796ddd985 /src/fl_rect.cxx
parent0542106cc247f5385388348cb4282b4018dfcc92 (diff)
Mac:
- Swapped cursor hotspot coordinates to ( y, x ) - clipping problem with images (Bug 43393) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_rect.cxx')
-rw-r--r--src/fl_rect.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index e58ecffd3..3d55405e1 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.4 2001/12/06 00:17:47 matthiaswm Exp $"
+// "$Id: fl_rect.cxx,v 1.10.2.4.2.5 2001/12/18 00:24:01 matthiaswm Exp $"
//
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -340,13 +340,15 @@ void fl_restore_clip() {
SelectClipRgn(fl_gc, r); //if r is NULL, clip is automatically cleared
#elif defined(__APPLE__)
# if 1
- RgnHandle portClip = NewRgn();
GrafPtr port = GetWindowPort( fl_window );
- CopyRgn( fl_window_region, portClip ); // changed
- if ( r )
- SectRgn( portClip, r, portClip );
- SetPortClipRegion( port, portClip );
- DisposeRgn( portClip );
+ 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 {
@@ -498,5 +500,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.4 2001/12/06 00:17:47 matthiaswm Exp $".
+// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.5 2001/12/18 00:24:01 matthiaswm Exp $".
//