summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-06-02 13:44:05 +0000
committerJack Jansen <jack.jansen@cwi.nl>2004-06-02 13:44:05 +0000
commit423e7be5722839e3d7458a35a9cd8e60ba0afab8 (patch)
tree42030aef78991b5051ded8a17090978807072aa0 /Mac
parenteb8b382b06b077ccc282447accf1f8d790b1a18f (diff)
downloadcpython-423e7be5722839e3d7458a35a9cd8e60ba0afab8.tar.gz
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c
index 271a5aa3d3..298aa0c6b4 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;