File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -6211,6 +6211,14 @@ static void timer_callback(CFRunLoopTimerRef timer, void* info)
6211
6211
6212
6212
static PyObject*
6213
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
+ */
6214
6222
{
6215
6223
PyObject* result;
6216
6224
CGDirectDisplayID display = CGMainDisplayID();
You can’t perform that action at this time.
0 commit comments