mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
DRYer
This commit is contained in:
parent
82523b14df
commit
95f5e9293e
1 changed files with 1 additions and 2 deletions
|
|
@ -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 {{{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue