]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.i
kill button release events
[chaz/openbox] / src / openbox.i
index 0e98bbfd49e63946da1213c6ee92908752531f2d..b88175d90e6565d7f984aa9d080e95fa8988ce25 100644 (file)
@@ -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;
This page took 0.025599 seconds and 4 git commands to generate.