- for (it = b->actions[a]; it; it = it->next) {
- ObAction *act = it->data;
- if (act->func != NULL) {
- act->data.any.c = c;
-
- g_assert(act->func != action_moveresize);
-
- if (act->func == action_showmenu) {
- act->data.showmenu.x = x;
- act->data.showmenu.y = y;
- }
-
- if (act->data.any.interactive) {
- act->data.inter.cancel = FALSE;
- act->data.inter.final = FALSE;
- keyboard_interactive_grab(state, c, context, act);
- }
-
- act->func(&act->data);
- }
- }
- return TRUE;
-}
-
-static gboolean fire_motion(ObMouseAction a, ObFrameContext context,
- ObClient *c, guint state, guint button,
- int x_root, int y_root, guint32 corner)
-{
- GSList *it;
- ObMouseBinding *b;
-
- for (it = bound_contexts[context]; it != NULL; it = it->next) {
- b = it->data;
- if (b->state == state && b->button == button)
- break;
- }
- /* if not bound, then nothing to do! */
- if (it == NULL) return FALSE;
-
- for (it = b->actions[a]; it; it = it->next) {
- ObAction *act = it->data;
- if (act->func != NULL) {
- act->data.any.c = c;
-
- if (act->func == action_moveresize) {
- act->data.moveresize.x = x_root;
- act->data.moveresize.y = y_root;
- act->data.moveresize.button = button;
- if (!(act->data.moveresize.corner ==
- prop_atoms.net_wm_moveresize_move ||
- act->data.moveresize.corner ==
- prop_atoms.net_wm_moveresize_move_keyboard ||
- act->data.moveresize.corner ==
- prop_atoms.net_wm_moveresize_size_keyboard))
- act->data.moveresize.corner = corner;
- } else
- g_assert_not_reached();
-
- act->func(&act->data);
- }
- }