forked from enlightenment/enlightenment
multiple desktops... BAD BAD BAD hack (alt F1-F8 take u to them) - just
thoguth i'd see how well ti really works in real life... not to bad actually :) SVN revision: 4412
This commit is contained in:
parent
f3fdf7d846
commit
4143f0353f
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -177,6 +177,70 @@ edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
edb_ed $DB add "/actions/"$NUM"/key" str "m"
|
edb_ed $DB add "/actions/"$NUM"/key" str "m"
|
||||||
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_CTRL_ALT
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_CTRL_ALT
|
||||||
NUM=$[ $NUM + 1 ];
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "0"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F1"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "1"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F2"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "2"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F3"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "3"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F4"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "4"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F5"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "5"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F6"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "6"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F7"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/params" str "7"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/button" int 0
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/key" str "F8"
|
||||||
|
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
|
||||||
|
NUM=$[ $NUM + 1 ];
|
||||||
edb_ed $DB add "/actions/count" int $NUM
|
edb_ed $DB add "/actions/count" int $NUM
|
||||||
|
|
||||||
# basic settings
|
# basic settings
|
||||||
|
|
|
@ -55,6 +55,8 @@ static void e_act_snap_start (void *o, E_Action *a, void *data, int x, int y, in
|
||||||
|
|
||||||
static void e_act_zoom_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry);
|
static void e_act_zoom_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry);
|
||||||
|
|
||||||
|
static void e_act_desk_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_action_find(char *action, int act, int button, char *key, Ev_Key_Modifiers mods, void *o)
|
_e_action_find(char *action, int act, int button, char *key, Ev_Key_Modifiers mods, void *o)
|
||||||
{
|
{
|
||||||
|
@ -467,6 +469,7 @@ e_actions_init(void)
|
||||||
e_action_add_proto("Window_Max_Size", e_act_max_start, NULL, NULL);
|
e_action_add_proto("Window_Max_Size", e_act_max_start, NULL, NULL);
|
||||||
e_action_add_proto("Winodw_Snap", e_act_snap_start, NULL, NULL);
|
e_action_add_proto("Winodw_Snap", e_act_snap_start, NULL, NULL);
|
||||||
e_action_add_proto("Window_Zoom", e_act_zoom_start, NULL, NULL);
|
e_action_add_proto("Window_Zoom", e_act_zoom_start, NULL, NULL);
|
||||||
|
e_action_add_proto("Desktop", e_act_desk_start, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1240,3 +1243,20 @@ e_act_zoom_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry
|
||||||
UN(ry);
|
UN(ry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
e_act_desk_start (void *o, E_Action *a, void *data, int x, int y, int rx, int ry)
|
||||||
|
{
|
||||||
|
int desk = 0;
|
||||||
|
|
||||||
|
if (a->params) desk = atoi(a->params);
|
||||||
|
e_desktops_goto(desk);
|
||||||
|
return;
|
||||||
|
UN(a);
|
||||||
|
UN(data);
|
||||||
|
UN(x);
|
||||||
|
UN(y);
|
||||||
|
UN(rx);
|
||||||
|
UN(ry);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ static Evas_List desktops = NULL;
|
||||||
static Window e_base_win = 0;
|
static Window e_base_win = 0;
|
||||||
static int screen_w, screen_h;
|
static int screen_w, screen_h;
|
||||||
static int current_desk = 0;
|
static int current_desk = 0;
|
||||||
|
static int current_desk_x = 0;
|
||||||
|
|
||||||
static void e_idle(void *data);
|
static void e_idle(void *data);
|
||||||
|
|
||||||
|
@ -267,3 +268,18 @@ e_desktops_get_current(void)
|
||||||
{
|
{
|
||||||
return current_desk;
|
return current_desk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_desktops_goto(int d)
|
||||||
|
{
|
||||||
|
int dx;
|
||||||
|
E_Desktop *desk;
|
||||||
|
|
||||||
|
dx = d - current_desk_x;
|
||||||
|
desk = e_desktops_get(0);
|
||||||
|
if (desk)
|
||||||
|
{
|
||||||
|
e_desktops_scroll(desk, -(dx * desk->real.w), 0);
|
||||||
|
}
|
||||||
|
current_desk_x = d;
|
||||||
|
}
|
||||||
|
|
1
src/e.h
1
src/e.h
|
@ -754,6 +754,7 @@ void e_desktops_hide(E_Desktop *d);
|
||||||
int e_desktops_get_num(void);
|
int e_desktops_get_num(void);
|
||||||
E_Desktop * e_desktops_get(int d);
|
E_Desktop * e_desktops_get(int d);
|
||||||
int e_desktops_get_current(void);
|
int e_desktops_get_current(void);
|
||||||
|
void e_desktops_goto(int num);
|
||||||
void e_desktops_update(E_Desktop *desk);
|
void e_desktops_update(E_Desktop *desk);
|
||||||
|
|
||||||
void e_resist_border(E_Border *b);
|
void e_resist_border(E_Border *b);
|
||||||
|
|
Loading…
Reference in New Issue