summaryrefslogtreecommitdiff
path: root/src/Fl_Widget.cxx
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-10-13 23:10:43 +0000
committerFabien Costantini <fabien@onepost.net>2008-10-13 23:10:43 +0000
commit92051890f1127429142cc0b60e3e9a1e567bf01d (patch)
tree4c0e7f28192914b24202d08aa3eaa72a7bf5f7e4 /src/Fl_Widget.cxx
parent8e9c1d1ab030dc7beed522f368c467dd94e1f8bb (diff)
Quickdraw removal: option removed from configure, all Qd code removed from sources. Also took this opportunity to sort the ifdef clauses so that USE_X11 shows first. Also added error pragma to enforce proper target checking, thus make even less assumptions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6423 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Widget.cxx')
-rw-r--r--src/Fl_Widget.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Fl_Widget.cxx b/src/Fl_Widget.cxx
index 24f3a02ff..b0df5afa0 100644
--- a/src/Fl_Widget.cxx
+++ b/src/Fl_Widget.cxx
@@ -164,7 +164,12 @@ Fl_Widget::draw_focus(Fl_Boxtype B, int X, int Y, int W, int H) const {
fl_color(fl_contrast(FL_BLACK, color()));
-#if defined(WIN32) || defined(__APPLE_QD__)
+#if defined(USE_X11) || defined(__APPLE_QUARTZ__)
+ fl_line_style(FL_DOT);
+ fl_rect(X + Fl::box_dx(B), Y + Fl::box_dy(B),
+ W - Fl::box_dw(B) - 1, H - Fl::box_dh(B) - 1);
+ fl_line_style(FL_SOLID);
+#elif defined(WIN32)
// Windows 95/98/ME do not implement the dotted line style, so draw
// every other pixel around the focus area...
//
@@ -183,10 +188,7 @@ Fl_Widget::draw_focus(Fl_Boxtype B, int X, int Y, int W, int H) const {
for (xx = W; xx > 0; xx --, i ++) if (i & 1) fl_point(X + xx, Y + H);
for (yy = H; yy > 0; yy --, i ++) if (i & 1) fl_point(X, Y + yy);
#else
- fl_line_style(FL_DOT);
- fl_rect(X + Fl::box_dx(B), Y + Fl::box_dy(B),
- W - Fl::box_dw(B) - 1, H - Fl::box_dh(B) - 1);
- fl_line_style(FL_SOLID);
+# error unsupported platform
#endif // WIN32
}