|
|
|
@ -124,6 +124,16 @@ _e_action_find(char *action, int act, int button, char *key, Ev_Key_Modifiers mo |
|
|
|
|
a->object = NULL; |
|
|
|
|
a->started = 0; |
|
|
|
|
actions = evas_list_append(actions, a); |
|
|
|
|
/* it's a key? lets grab it! */ |
|
|
|
|
if ((a->key) && (strlen(a->key) > 0)) |
|
|
|
|
{ |
|
|
|
|
printf("grab it! (%s %i)\n", a->key, a->modifiers); |
|
|
|
|
if (a->modifiers == -1) |
|
|
|
|
e_keys_grab(a->key, EV_KEY_MODIFIER_NONE, 1); |
|
|
|
|
else |
|
|
|
|
e_keys_grab(a->key, (Ev_Key_Modifiers)a->modifiers, 0); |
|
|
|
|
a->grabbed = 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
error: |
|
|
|
|
e_db_close(db); |
|
|
|
@ -185,6 +195,15 @@ _e_action_find(char *action, int act, int button, char *key, Ev_Key_Modifiers mo |
|
|
|
|
static void |
|
|
|
|
_e_action_free(E_Action *a) |
|
|
|
|
{ |
|
|
|
|
/* it's a key? lets ungrab it! */ |
|
|
|
|
if ((a->key) && (strlen(a->key) > 0) && (a->grabbed)) |
|
|
|
|
{ |
|
|
|
|
printf("ungrab it! (%s %i)\n", a->key, a->modifiers); |
|
|
|
|
if (a->modifiers == -1) |
|
|
|
|
e_keys_ungrab(a->key, EV_KEY_MODIFIER_NONE, 1); |
|
|
|
|
else |
|
|
|
|
e_keys_ungrab(a->key, (Ev_Key_Modifiers)a->modifiers, 0); |
|
|
|
|
} |
|
|
|
|
IF_FREE(a->name); |
|
|
|
|
IF_FREE(a->action); |
|
|
|
|
IF_FREE(a->params); |
|
|
|
@ -466,6 +485,8 @@ e_act_move_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
b->mode.move = 1; |
|
|
|
|
b->current.requested.dx = 0; |
|
|
|
|
b->current.requested.dy = 0; |
|
|
|
@ -486,6 +507,8 @@ e_act_move_stop (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
b->current.requested.x = b->current.x; |
|
|
|
|
b->current.requested.y = b->current.y; |
|
|
|
|
b->changed = 1; |
|
|
|
@ -510,6 +533,8 @@ e_act_move_go (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
b->current.requested.x += dx; |
|
|
|
|
b->current.requested.y += dy; |
|
|
|
|
if (dx != 0) b->current.requested.dx = dx; |
|
|
|
@ -532,6 +557,8 @@ e_act_resize_start (void *o, E_Action *a, void *data, int x, int y, int rx, int |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
/* 0 | 1 */ |
|
|
|
|
/* --+-- */ |
|
|
|
@ -575,6 +602,8 @@ e_act_resize_stop (void *o, E_Action *a, void *data, int x, int y, int rx, int |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
b->current.requested.x = b->current.x; |
|
|
|
|
b->current.requested.y = b->current.y; |
|
|
|
@ -598,6 +627,8 @@ e_act_resize_go (void *o, E_Action *a, void *data, int x, int y, int rx, int |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
if (b->mode.resize == 0) |
|
|
|
|
{ |
|
|
|
@ -641,6 +672,8 @@ e_act_resize_h_start (void *o, E_Action *a, void *data, int x, int y, int rx, in |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
/* 4 | 5 */ |
|
|
|
|
if (x > (b->current.w / 2))
|
|
|
|
@ -667,6 +700,8 @@ e_act_resize_h_stop (void *o, E_Action *a, void *data, int x, int y, int rx, in |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
b->current.requested.x = b->current.x; |
|
|
|
|
b->current.requested.y = b->current.y; |
|
|
|
@ -690,6 +725,8 @@ e_act_resize_h_go (void *o, E_Action *a, void *data, int x, int y, int rx, in |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
if (b->mode.resize == 4) |
|
|
|
|
{ |
|
|
|
@ -719,6 +756,8 @@ e_act_resize_v_start (void *o, E_Action *a, void *data, int x, int y, int rx, in |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
/* 6 */ |
|
|
|
|
/* - */ |
|
|
|
@ -747,6 +786,8 @@ e_act_resize_v_stop (void *o, E_Action *a, void *data, int x, int y, int rx, in |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
b->current.requested.x = b->current.x; |
|
|
|
|
b->current.requested.y = b->current.y; |
|
|
|
@ -770,6 +811,8 @@ e_act_resize_v_go (void *o, E_Action *a, void *data, int x, int y, int rx, in |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded != 0) return; |
|
|
|
|
if (b->mode.resize == 6) |
|
|
|
|
{ |
|
|
|
@ -799,6 +842,8 @@ e_act_close_start (void *o, E_Action *a, void *data, int x, int y, int rx, int r |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->win.client) e_icccm_delete(b->win.client); |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
@ -816,6 +861,8 @@ e_act_kill_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->win.client) e_window_kill_client(b->win.client); |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
@ -837,6 +884,8 @@ e_act_cb_shade(int val, void *data) |
|
|
|
|
int pix_per_sec = 3200; |
|
|
|
|
|
|
|
|
|
b = data; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (val == 0)
|
|
|
|
|
{ |
|
|
|
|
OBJ_REF(b); |
|
|
|
@ -875,6 +924,8 @@ e_act_cb_unshade(int val, void *data) |
|
|
|
|
int pix_per_sec = 3200; |
|
|
|
|
|
|
|
|
|
b = data; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (val == 0)
|
|
|
|
|
{ |
|
|
|
|
OBJ_REF(b); |
|
|
|
@ -909,6 +960,8 @@ e_act_shade_start (void *o, E_Action *a, void *data, int x, int y, int rx, int r |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded == 0) e_act_cb_shade(0, b); |
|
|
|
|
else e_act_cb_unshade(0, b); |
|
|
|
|
return; |
|
|
|
@ -927,6 +980,8 @@ e_act_raise_start (void *o, E_Action *a, void *data, int x, int y, int rx, int r |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
e_border_raise(b); |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
@ -944,6 +999,8 @@ e_act_lower_start (void *o, E_Action *a, void *data, int x, int y, int rx, int r |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
e_border_lower(b); |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
@ -961,6 +1018,8 @@ e_act_raise_lower_start (void *o, E_Action *a, void *data, int x, int y, int rx, |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
|
UN(data); |
|
|
|
@ -993,6 +1052,8 @@ e_act_menu_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
|
UN(data); |
|
|
|
@ -1043,6 +1104,8 @@ e_act_stick_start (void *o, E_Action *a, void *data, int x, int y, int rx, int r |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->client.sticky) b->client.sticky = 0; |
|
|
|
|
else b->client.sticky = 1; |
|
|
|
|
b->changed = 1; |
|
|
|
@ -1078,6 +1141,8 @@ e_act_iconify_start (void *o, E_Action *a, void *data, int x, int y, int rx, int |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
|
UN(data); |
|
|
|
@ -1094,6 +1159,9 @@ e_act_max_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry) |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
printf("e_act_max_start\n"); |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
if (b->current.shaded > 0) return; |
|
|
|
|
if ((b->mode.move) || (b->mode.resize)) return; |
|
|
|
|
b->mode.move = 0; |
|
|
|
@ -1146,6 +1214,8 @@ e_act_snap_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
|
UN(data); |
|
|
|
@ -1162,6 +1232,8 @@ e_act_zoom_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry |
|
|
|
|
E_Border *b; |
|
|
|
|
|
|
|
|
|
b = o; |
|
|
|
|
if (!b) b = e_border_current_focused(); |
|
|
|
|
if (!b) return; |
|
|
|
|
return; |
|
|
|
|
UN(a); |
|
|
|
|
UN(data); |
|
|
|
|