diff options
| author | Manolo Gouy <Manolo> | 2015-01-14 10:23:24 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2015-01-14 10:23:24 +0000 |
| commit | d7e4831dbe4a988541ce56159f76a0698d210572 (patch) | |
| tree | 02f27fe991c2c0e2c0294c552c10430f0036bd76 | |
| parent | 56fd2fc9f9295af457c0d4769205d8424c28ce4b (diff) | |
A public header file must not use a preprocessor variable such as MAC_OS_X_VERSION_10_7
because it is only defined internally to FLTK.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10516 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/Fl_Gl_Window.H | 2 | ||||
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index 7bec39877..b701e047e 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -202,7 +202,7 @@ public: // Note: Doxygen docs in Fl_Widget.H to avoid redundancy. virtual Fl_Gl_Window* as_gl_window() {return this;} -#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 +#if defined(__APPLE__) int pixel_w(); int pixel_h(); #else diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index d4fdfe5a1..2c6ffd916 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -99,19 +99,27 @@ void Fl_Gl_Window::show() { #endif /* __APPLE__ */ } -#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 +#if defined(__APPLE__) int Fl_Gl_Window::pixel_w() { +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 return Fl_X::resolution_scaling_factor(this) * w(); +#else + return w(); +#endif } int Fl_Gl_Window::pixel_h() { +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 return Fl_X::resolution_scaling_factor(this) * h(); +#else + return h(); +#endif } -#endif +#endif // __APPLE__ /** The invalidate() method turns off valid() and is |
