diff options
| author | Manolo Gouy <Manolo> | 2016-03-31 05:01:22 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-31 05:01:22 +0000 |
| commit | 62f9813e4ed6a001848d3c31b72f3d48d48df774 (patch) | |
| tree | 14e7a8a4fdebcc9e9579de91eee709a45142fa5b /src/drivers | |
| parent | 9959aff3681ccb897dc861cbfe08a1d4f4ee937c (diff) | |
Fix error with PostScript driver on the Mac platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11481 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index 9f0b497ff..c202da51f 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -98,6 +98,7 @@ void Fl_Cocoa_Window_Driver::flush_overlay() void Fl_Cocoa_Window_Driver::draw_begin() { + if (!Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) return; CGContextRef gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); if (shape_data_) { # if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 @@ -118,8 +119,7 @@ void Fl_Cocoa_Window_Driver::draw_end() { // on OS X, windows have no frame. Before OS X 10.7, to resize a window, we drag the lower right // corner. This code draws a little ribbed triangle for dragging. - CGContextRef gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); - if (fl_mac_os_version < 100700 && gc && !parent() && pWindow->resizable() && + if (fl_mac_os_version < 100700 && !parent() && pWindow->resizable() && (!size_range_set() || minh() != maxh() || minw() != maxw())) { int dx = Fl::box_dw(pWindow->box())-Fl::box_dx(pWindow->box()); int dy = Fl::box_dh(pWindow->box())-Fl::box_dy(pWindow->box()); @@ -139,7 +139,10 @@ void Fl_Cocoa_Window_Driver::draw_end() } } # if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 - if (shape_data_) CGContextRestoreGState(gc); + if (Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) { + CGContextRef gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc(); + if (shape_data_) CGContextRestoreGState(gc); + } # endif } |
