summaryrefslogtreecommitdiff
path: root/src/Fl_Double_Window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Double_Window.cxx')
-rw-r--r--src/Fl_Double_Window.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 6f823d41e..83af44b62 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -361,8 +361,9 @@ void fl_begin_offscreen(Fl_Offscreen ctx) {
/** Quit sending drawing commands to the current offscreen buffer.
*/
void fl_end_offscreen() {
- Fl_X::q_release_context();
fl_pop_clip();
+ CGContextRestoreGState(fl_gc); // matches CGContextSaveGState in fl_begin_offscreen()
+ CGContextFlush(fl_gc);
if (stack_ix>0)
stack_ix--;
else