summaryrefslogtreecommitdiff
path: root/src/drivers/Darwin
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-30 15:57:19 +0000
committerManolo Gouy <Manolo>2016-03-30 15:57:19 +0000
commit4a633d2aefd5fd538a3b446beaad17ce9a9caa6d (patch)
tree3dd39cfa6a98501b043fb93c54cff6b3a7cee1bf /src/drivers/Darwin
parent2ac2b506a8ea6e0656a8bb6f81a8f0c1887256b7 (diff)
Make sure fl_mac_os_version is defined when the Fl_Darwin_System_Driver object is used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11475 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Darwin')
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.H1
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H
index 910270653..12148fb55 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H
@@ -44,6 +44,7 @@
class Fl_Darwin_System_Driver : public Fl_System_Driver
{
public:
+ Fl_Darwin_System_Driver();
virtual int single_arg(const char *arg);
virtual int arg_and_value(const char *name, const char *value);
virtual int compose(int &del);
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index 1430be536..8fbdac6ca 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -45,6 +45,10 @@ Fl_System_Driver *Fl_System_Driver::driver() {
return d;
}
+Fl_Darwin_System_Driver::Fl_Darwin_System_Driver() {
+ if (fl_mac_os_version == 0) fl_mac_os_version = Fl_X::calc_mac_os_version();
+}
+
int Fl_Darwin_System_Driver::single_arg(const char *arg) {
// The Finder application in MacOS X passes the "-psn_N_NNNNN" option to all apps.
return (strncmp(arg, "psn_", 4) == 0);