This commit is contained in:
Kovid Goyal 2025-05-18 11:47:22 +05:30
parent 82523b14df
commit 95f5e9293e
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -2614,8 +2614,7 @@ set_layer_shell_config(PyObject *self UNUSED, PyObject *args) {
static PyObject*
grab_keyboard(PyObject *self UNUSED, PyObject *action) {
if (action == Py_None) return Py_NewRef(glfwGrabKeyboard(2) ? Py_True : Py_False);
return Py_NewRef(glfwGrabKeyboard(PyObject_IsTrue(action)) ? Py_True : Py_False);
return Py_NewRef(glfwGrabKeyboard(action == Py_None ? 2 : PyObject_IsTrue(action)) ? Py_True : Py_False);
}
// Boilerplate {{{