From 43285d4d3d18f45bf7a3c5c8bc531a1434188916 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 2 Jun 2004 13:44:05 +0000 Subject: [PATCH] CGMainDisplayID() doesn't exist on 10.1, so don't try to call it when building for that platform. --- Mac/Modules/macosmodule.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 271a5aa3d39..298aa0c6b4e 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;