-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);
- }
- }
- return TRUE;
-}
-
-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;
- }
-}
-
-void mouse_event(ObClient *client, ObFrameContext context, XEvent *e)