Add macos_hide_from_tasks option

This commit is contained in:
Alex Lau
2018-04-23 21:55:05 -07:00
parent 0b99bb534f
commit 7d4d978d97
4 changed files with 15 additions and 0 deletions

View File

@@ -228,6 +228,12 @@ macos_change_titlebar_color(PyObject *self UNUSED, PyObject *val) {
Py_RETURN_NONE;
}
static PyObject*
macos_set_hide_from_tasks(PyObject *self UNUSED, PyObject *val UNUSED) {
[NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory];
Py_RETURN_NONE;
}
void
cocoa_set_titlebar_color(void *w)
{
@@ -260,6 +266,7 @@ static PyMethodDef module_methods[] = {
{"cocoa_get_lang", (PyCFunction)cocoa_get_lang, METH_NOARGS, ""},
{"cwd_of_process", (PyCFunction)cwd_of_process, METH_O, ""},
{"macos_change_titlebar_color", (PyCFunction)macos_change_titlebar_color, METH_O, ""},
{"macos_set_hide_from_tasks", (PyCFunction)macos_set_hide_from_tasks, METH_NOARGS, ""},
{NULL, NULL, 0, NULL} /* Sentinel */
};