summaryrefslogtreecommitdiff
path: root/src/python.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-25 04:54:44 +0000
committerDana Jansens <danakj@orodu.net>2002-12-25 04:54:44 +0000
commitb34824a4e2ddc0247099fa1b3952de426bfde05b (patch)
tree123c1d179da9554c06f0c9c9fb8ddce544b75fba /src/python.cc
parentb9a2430dcccfec8d70aea68dbb1964e562216b79 (diff)
global python scripts. client motion/resizing is all done via python now
Diffstat (limited to 'src/python.cc')
-rw-r--r--src/python.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/python.cc b/src/python.cc
index a00bc245..d44b2d48 100644
--- a/src/python.cc
+++ b/src/python.cc
@@ -55,14 +55,25 @@ bool python_unregister(int action, PyObject *callback)
void python_callback(OBActions::ActionType action, Window window,
OBWidget::WidgetType type, unsigned int state,
- long d1, long d2)
+ long d1, long d2, long d3, long d4)
{
PyObject *arglist;
PyObject *result;
assert(action >= 0 && action < OBActions::NUM_ACTIONS);
- arglist = Py_BuildValue("iliill", action, window, type, state, d1, d2);
+ if (d4 != LONG_MIN)
+ arglist = Py_BuildValue("iliillll", action, window, type, state,
+ d1, d2, d3, d4);
+ else if (d3 != LONG_MIN)
+ arglist = Py_BuildValue("iliilll", action, window, type, state,
+ d1, d2, d3);
+ else if (d2 != LONG_MIN)
+ arglist = Py_BuildValue("iliill", action, window, type, state, d1, d2);
+ else if (d1 != LONG_MIN)
+ arglist = Py_BuildValue("iliil", action, window, type, state, d1);
+ else
+ arglist = Py_BuildValue("ilii", action, window, type, state);
FunctionList::iterator it, end = callbacks[action].end();
for (it = callbacks[action].begin(); it != end; ++it) {