diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-06-06 08:00:56 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-06-06 08:00:56 +0000 |
| commit | 30786c2ed39ef0e8482b48b6663ffd99fb032ddd (patch) | |
| tree | 295b630bbc3de3d9c0639b11a2e69fd737a962ea /src/Fl_mac.cxx | |
| parent | 587e1d170b1b7f0757d24cb44769b7af2993bf8d (diff) | |
STR #1310: OS X Quartz support fixed. All test codes now work without complaints fro Quickdraw or CoreGraphics. If no more major bugs are reported for Quartz, I will make Quartz the default over Quickdraw in the next release of FLTK 1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_mac.cxx')
| -rw-r--r-- | src/Fl_mac.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index c7a03531a..732f4f143 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -2032,6 +2032,7 @@ void Fl_Window::resize(int X,int Y,int W,int H) { void Fl_Window::make_current() { #ifdef __APPLE_QUARTZ__ + OSStatus err; Fl_X::q_release_context(); #endif if ( !fl_window_region ) @@ -2068,7 +2069,9 @@ void Fl_Window::make_current() } #ifdef __APPLE_QUARTZ__ - QDBeginCGContext(GetWindowPort(i->xid), &i->gc); + err = QDBeginCGContext(GetWindowPort(i->xid), &i->gc); + if (err!=noErr) + fprintf(stderr, "Error %d in QDBeginCGContext\n", (int)err); fl_gc = i->gc; CGContextSaveGState(fl_gc); Fl_X::q_fill_context(); @@ -2117,7 +2120,11 @@ void Fl_X::q_release_context(Fl_X *x) { if (x && x->gc!=fl_gc) return; if (!fl_gc) return; CGContextRestoreGState(fl_gc); - if (fl_window) QDEndCGContext(GetWindowPort(fl_window), &fl_gc); + if (fl_window) { + OSStatus err = QDEndCGContext(GetWindowPort(fl_window), &fl_gc); + if (err!=noErr) + fprintf(stderr, "Error %d in QDEndCGContext\n", (int)err); + } fl_gc = 0; } |
