OBWidget *w = dynamic_cast<OBWidget*>
(Openbox::instance->findHandler(e.window));
- // run the RELEASE python hook
- doCallback(Action_ButtonRelease, e.window,
- (OBWidget::WidgetType)(w ? w->type():-1),
- e.state, e.button, e.x_root, e.y_root, e.time);
-
// not for the button we're watching?
if (_button != e.button) return;
// run the simple MOTION python hook for now...
doCallback(Action_MouseMotion, e.window,
(OBWidget::WidgetType)(w ? w->type():-1),
- e.state, (unsigned)-1, e.x_root, e.y_root, e.time);
+ e.state, (unsigned)-1, x_root, y_root, e.time);
}
void OBActions::mapRequestHandler(const XMapRequestEvent &e)
CallbackMap::iterator it;
for (it = it_pair.first; it != it_pair.second; ++it)
if (it->second == func)
- break;
- if (it == it_pair.second) // not already in there
- if (atfront)
- _callbacks.insert(_callbacks.begin(), CallbackMapPair(action, func));
- else
- _callbacks.insert(CallbackMapPair(action, func));
+ return true; // already in there
+ if (atfront)
+ _callbacks.insert(_callbacks.begin(), CallbackMapPair(action, func));
+ else
+ _callbacks.insert(CallbackMapPair(action, func));
Py_INCREF(func);
return true;
}