From: Jack Jansen Date: Wed, 2 Jun 2004 13:42:47 +0000 (+0000) Subject: CGMainDisplayID() doesn't exist on 10.1, so don't try to call it when X-Git-Tag: v2.3.5c1~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24dea56a4ee9d23a6880c23c915029f037f1638d;p=thirdparty%2FPython%2Fcpython.git CGMainDisplayID() doesn't exist on 10.1, so don't try to call it when building for that platform. --- diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 6790418b9619..e18e36126014 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -545,9 +545,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;