Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0df8646 commit 5607c24Copy full SHA for 5607c24
1 file changed
src/_macosx.m
@@ -6211,6 +6211,14 @@ static void timer_callback(CFRunLoopTimerRef timer, void* info)
6211
6212
static PyObject*
6213
verify_main_display(PyObject* self)
6214
+/* Python2 contains a WMAvailable function in the MacOS module to check
6215
+ * if python can interact with the display. This function calls
6216
+ * CGMainDisplayID, which will return 0 if no window manager is available,
6217
+ * or if we don't have permission to talk to it; this will happen if Python
6218
+ * is not installed as a framework.
6219
+ * The MacOS module was removed from Python3, so we need to provide a way
6220
+ * to call CGMainDisplayID ourselves.
6221
+ */
6222
{
6223
PyObject* result;
6224
CGDirectDisplayID display = CGMainDisplayID();
0 commit comments