summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fl_rect.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index bfcf1262a..f7a49cb7c 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -548,19 +548,13 @@ void Fl_Graphics_Driver::restore_clip() {
#elif defined(WIN32)
SelectClipRgn(fl_gc, r); //if r is NULL, clip is automatically cleared
#elif defined(__APPLE_QUARTZ__)
- if ( fl_window ) { // clipping for a true window
+ if ( fl_window || fl_gc ) { // clipping for a true window or an offscreen buffer
Fl_X::q_clear_clipping();
Fl_X::q_fill_context();//flip coords if bitmap context
//apply program clip
if (r) {
CGContextClipToRects(fl_gc, r->rects, r->count);
}
- } else if (fl_gc) { // clipping for an offscreen drawing world (CGBitmap)
- Fl_X::q_clear_clipping();
- Fl_X::q_fill_context();
- if (r) {
- CGContextClipToRects(fl_gc, r->rects, r->count);
- }
}
#else
# error unsupported platform