diff --git a/src/_macosx.m b/src/_macosx.m index b0da1fb84f4d..3c33ec3fa2fb 100755 --- a/src/_macosx.m +++ b/src/_macosx.m @@ -684,6 +684,13 @@ static CGFloat _get_device_scale(CGContextRef cr) Py_RETURN_NONE; } +static PyObject* +FigureManager_full_screen_toggle(FigureManager* self) +{ + [self->window toggleFullScreen: nil]; + Py_RETURN_NONE; +} + static PyTypeObject FigureManagerType = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_macosx.FigureManager", @@ -714,6 +721,9 @@ static CGFloat _get_device_scale(CGContextRef cr) {"resize", (PyCFunction)FigureManager_resize, METH_VARARGS}, + {"full_screen_toggle", + (PyCFunction)FigureManager_full_screen_toggle, + METH_NOARGS}, {} // sentinel }, };