summaryrefslogtreecommitdiff
path: root/src/Fl_Window.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Window.cxx')
-rw-r--r--src/Fl_Window.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index a06ac29cd..d25a443d0 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -111,7 +111,8 @@ void Fl_Window::draw() {
draw_children();
#ifdef __APPLE_QUARTZ__
- if (!parent() && resizable() && (!size_range_set || minh!=maxh || minw!=maxw)) {
+ extern CGContextRef fl_gc;
+ if (fl_gc && !parent() && resizable() && (!size_range_set || minh!=maxh || minw!=maxw)) {
int dx = Fl::box_dw(box())-Fl::box_dx(box());
int dy = Fl::box_dh(box())-Fl::box_dy(box());
if (dx<=0) dx = 1;
@@ -126,10 +127,6 @@ void Fl_Window::draw() {
int i;
for (i=dx; i<12; i++) {
fl_color(c[i&3]);
-#ifdef __APPLE_COCOA__
- extern CGContextRef fl_gc;
- if(fl_gc)
-#endif
fl_line(x1--, y1, x2, y2--);
}
}