- if (act->func == action_showmenu) {
- act->data.showmenu.x = x;
- act->data.showmenu.y = y;
- }
-
- if (act->func == action_desktop_dir)
- {
- act->data.desktopdir.final = FALSE;
- act->data.desktopdir.cancel = FALSE;
- }
- if (act->func == action_send_to_desktop_dir)
- {
- act->data.sendtodir.final = FALSE;
- act->data.sendtodir.cancel = FALSE;
- }
-
- if (config_desktop_popup &&
- (act->func == action_desktop_dir ||
- act->func == action_send_to_desktop_dir))
- {
- keyboard_interactive_grab(state, c, context, act);
- }
-
- act->func(&act->data);
- }
- }
-}
-
-static void 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;
-
- 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);
- }
- }
-}
-
-static guint32 pick_corner(int x, int y, int cx, int cy, int cw, int ch)
-{
- if (x - cx < cw / 2) {
- if (y - cy < ch / 2)
- return prop_atoms.net_wm_moveresize_size_topleft;
- else
- return prop_atoms.net_wm_moveresize_size_bottomleft;
- } else {
- if (y - cy < ch / 2)
- return prop_atoms.net_wm_moveresize_size_topright;
- else
- return prop_atoms.net_wm_moveresize_size_bottomright;
- }