-
- // XXX: i can envision all sorts of crazy shit with this.. gestures, etc
- // maybe that should all be done via python tho.. (or radial menus!)
- // run the simple MOTION python hook for now...
- doCallback(Action_MouseMotion, e.window,
- (OBWidget::WidgetType)(w ? w->type():-1),
- e.state, (unsigned)-1, x_root, y_root, e.time);
+ assert(w); // everything should be a widget
+
+ // run the MOTION python hook
+ unsigned int state = e.state & (ControlMask | ShiftMask | Mod1Mask |
+ Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask);
+ unsigned int button = _posqueue[0]->button;
+ MotionData *data = new_motion_data(e.window, e.time, state, button,
+ w->mcontext(), MouseMotion,
+ x_root, y_root, _posqueue[0]->pos,
+ _posqueue[0]->clientarea);
+ Openbox::instance->bindings()->fireButton((ButtonData*)data);
+ Py_DECREF((PyObject*)data);