]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
CGMainDisplayID() doesn't exist on 10.1, so don't try to call it when
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 2 Jun 2004 13:42:47 +0000 (13:42 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 2 Jun 2004 13:42:47 +0000 (13:42 +0000)
building for that platform.

Mac/Modules/macosmodule.c

index 6790418b9619758997ce9e98d00472d43b8e5c4c..e18e36126014af4c0b2d445a2365efb1014cf69e 100644 (file)
@@ -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;