X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.i;h=b88175d90e6565d7f984aa9d080e95fa8988ce25;hb=e05d5f7934ce27893f900627fbd06b1679d4c0ad;hp=0e98bbfd49e63946da1213c6ee92908752531f2d;hpb=6d58d84f22887f03ac5471b9775452b90103b6f0;p=chaz%2Fopenbox diff --git a/src/openbox.i b/src/openbox.i index 0e98bbfd..b88175d9 100644 --- a/src/openbox.i +++ b/src/openbox.i @@ -28,7 +28,6 @@ %inline %{ enum ActionType { Action_ButtonPress, - Action_ButtonRelease, Action_Click, Action_DoubleClick, Action_EnterWindow, @@ -99,6 +98,10 @@ PyObject * unregister_all(int action) PyObject * bind(PyObject *keylist, PyObject *func) { + if (!PyCallable_Check(func)) { + PyErr_SetString(PyExc_TypeError, "Invalid callback function."); + return NULL; + } if (!PyList_Check(keylist)) { PyErr_SetString(PyExc_TypeError, "Invalid keylist. Not a list."); return NULL;