diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2004-06-02 13:44:05 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2004-06-02 13:44:05 (GMT) |
commit | 43285d4d3d18f45bf7a3c5c8bc531a1434188916 (patch) | |
tree | 4dade07e3c3dad8e5f3e1b7444759b58e927383e /Mac | |
parent | aa2e498251e753d762d58486d66c0f1ca6f81783 (diff) | |
download | cpython-43285d4d3d18f45bf7a3c5c8bc531a1434188916.zip cpython-43285d4d3d18f45bf7a3c5c8bc531a1434188916.tar.gz cpython-43285d4d3d18f45bf7a3c5c8bc531a1434188916.tar.bz2 |
CGMainDisplayID() doesn't exist on 10.1, so don't try to call it when
building for that platform.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/macosmodule.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 271a5aa..298aa0c 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -439,9 +439,16 @@ MacOS_WMAvailable(PyObject *self, PyObject *args) ** It appears the function caches the result itself, and it's cheap, so ** no need for us to cache. */ +#ifdef kCGNullDirectDisplay + /* On 10.1 CGMainDisplayID() isn't available, and + ** kCGNullDirectDisplay isn't defined. + */ if (CGMainDisplayID() == 0) { rv = Py_False; } else { +#else + { +#endif if (GetCurrentProcess(&psn) < 0 || SetFrontProcess(&psn) < 0) { rv = Py_False; |