SVN revision: 15555
This commit is contained in:
Carsten Haitzler 2005-06-28 04:00:17 +00:00
parent 73fbff9c58
commit 791c7e0eb1
6 changed files with 101 additions and 62 deletions

16
TODO
View File

@ -8,8 +8,11 @@ Some of the things (in very short form) that need to be done to E17...
BUGS / FIXES
-------------------------------------------------------------------------------
* BUG: sometimes unshade fails. Must be the wrong order of some events.
* FIX: need to hide other windows while doing fullscreen.
* BUG: sometimes unshade fails. Must be the wrong order of some events. (under
what conditions? i don't see it)
* BUG: when fullscreen should put up big black window above all windows EXCEPT
the fullscreen one (no need to hide other windows). in general fullscreen
needs work, cleaning and testing
* BUG: on font apply borders need to be adjusted for size changes
* BUG: font apply doesnt seem to keep working (edje problem?) unless you
restart
@ -28,8 +31,6 @@ Some of the things (in very short form) that need to be done to E17...
hidden, until you flip desktops then it appears again - but with no client
around. currently they have a dangling reference - need to find out WHO
added that ref and didnt remove it (i haven't seen this for ages now)
* BUG: fix action delete (can segv if action is stored for "long runing actions"
like move/resize)
* BUG: if you have 2 zones and you fill up zone 2 (right) mostly and then run
a big xev (xev -g 1280x1024) that wont fit it gets placed offscreen to the
right of zone 2
@ -159,6 +160,13 @@ Some of the things (in very short form) that need to be done to E17...
CLEANUPS
-------------------------------------------------------------------------------
* winlist should support place for window "screenshot" in list as well as
app icon
* winlist should in theory allow horizontal list layout not just vertical (set
by the theme)
* winlist could divide windows up into blocks - sub-lists within a container
pwer desktop (with stick windows considered to live on the "current" desk
when winlist starts)
* make auto kill client and the kill() stuff config options
* make 10.0 sec ping time and the 10.0 sec wait for a SIGKILL an option
* make it easy for modules to hook into ipc and extend it for themselves

View File

@ -6,48 +6,49 @@
#define INITS
#define ACT_GO(name) \
{ \
act = e_action_set(#name); \
act = e_action_add(#name); \
if (act) act->func.go = _e_actions_act_##name##_go; \
}
#define ACT_FN_GO(act) \
static void _e_actions_act_##act##_go(E_Object *obj, char *params)
#define ACT_GO_MOUSE(name) \
{ \
act = e_action_set(#name); \
act = e_action_add(#name); \
if (act) act->func.go_mouse = _e_actions_act_##name##_go_mouse; \
}
#define ACT_FN_GO_MOUSE(act) \
static void _e_actions_act_##act##_go_mouse(E_Object *obj, char *params, Ecore_X_Event_Mouse_Button_Down *ev)
#define ACT_GO_KEY(name) \
{ \
act = e_action_set(#name); \
act = e_action_add(#name); \
if (act) act->func.go_key = _e_actions_act_##name##_go_key; \
}
#define ACT_FN_GO_KEY(act) \
static void _e_actions_act_##act##_go_key(E_Object *obj, char *params, Ecore_X_Event_Key_Down *ev)
#define ACT_END(name) \
{ \
act = e_action_set(#name); \
act = e_action_add(#name); \
if (act) act->func.end = _e_actions_act_##name##_end; \
}
#define ACT_FN_END(act) \
static void _e_actions_act_##act##_end(E_Object *obj, char *params)
#define ACT_END_MOUSE(name) \
{ \
act = e_action_set(#name); \
act = e_action_add(#name); \
if (act) act->func.end_mouse = _e_actions_act_##name##_end_mouse; \
}
#define ACT_FN_END_MOUSE(act) \
static void _e_actions_act_##act##_end_mouse(E_Object *obj, char *params, Ecore_X_Event_Mouse_Button_Up *ev)
#define ACT_END_KEY(name) \
{ \
act = e_action_set(#name); \
act = e_action_add(#name); \
if (act) act->func.end_key = _e_actions_act_##name##_end_key; \
}
#define ACT_FN_END_KEY(act) \
static void _e_actions_act_##act##_end_key(E_Object *obj, char *params, Ecore_X_Event_Key_Up *ev)
/* local subsystem functions */
static void _e_action_free(E_Action *act);
static Evas_Bool _e_actions_cb_free(Evas_Hash *hash, const char *key, void *data, void *fdata);
/* to save writing this in N places - the sctions are defined here */
@ -703,6 +704,22 @@ e_actions_shutdown(void)
return 1;
}
E_Action *
e_action_add(char *name)
{
E_Action *act;
act = e_action_find(name);
if (!act)
{
act = E_OBJECT_ALLOC(E_Action, E_ACTION_TYPE, _e_action_free);
if (!act) return NULL;
act->name = strdup(name);
actions = evas_hash_add(actions, name, act);
}
return act;
}
E_Action *
e_action_find(char *name)
{
@ -712,45 +729,20 @@ e_action_find(char *name)
return act;
}
E_Action *
e_action_set(char *name)
{
E_Action *act;
act = e_action_find(name);
if (!act)
{
act = calloc(1, sizeof(E_Action));
if (!act) return NULL;
act->name = strdup(name);
actions = evas_hash_add(actions, name, act);
}
return act;
}
void
e_action_del(char *name)
{
E_Action *act;
act = e_action_find(name);
if (act)
{
actions = evas_hash_del(actions, name, act);
IF_FREE(act->name);
free(act);
}
}
/* local subsystem functions */
static void
_e_action_free(E_Action *act)
{
actions = evas_hash_del(actions, act->name, act);
IF_FREE(act->name);
free(act);
}
static Evas_Bool
_e_actions_cb_free(Evas_Hash *hash __UNUSED__, const char *key __UNUSED__,
void *data, void *fdata __UNUSED__)
{
E_Action *act;
act = data;
IF_FREE(act->name);
free(act);
e_object_del(E_OBJECT(data));
return 1;
}

View File

@ -5,8 +5,16 @@
typedef struct _E_Action E_Action;
#else
#ifndef E_ACTIONS_H
#define E_ACTIONS_H
#define E_ACTION_TYPE 0xE0b01010
struct _E_Action
{
E_Object e_obj_inherit;
char *name;
struct {
void (*go) (E_Object *obj, char *params);
@ -18,16 +26,11 @@ struct _E_Action
} func;
};
#else
#ifndef E_ACTIONS_H
#define E_ACTIONS_H
EAPI int e_actions_init(void);
EAPI int e_actions_shutdown(void);
EAPI E_Action *e_action_add(char *name);
EAPI E_Action *e_action_find(char *name);
EAPI E_Action *e_action_set(char *name);
EAPI void e_action_del(char *name);
#endif
#endif

View File

@ -1879,6 +1879,12 @@ _e_border_free(E_Border *bd)
_e_border_move_end(bd);
/* TODO: Other states to end before dying? */
if (bd->cur_mouse_action)
{
e_object_unref(E_OBJECT(bd->cur_mouse_action));
bd->cur_mouse_action = NULL;
}
IF_FREE(bd->shape_rects);
bd->shape_rects_num = 0;
if (bd->dangling_ref_check)
@ -2636,6 +2642,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_TL;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_SE);
}
else if (e->direction == RESIZE_T)
@ -2645,6 +2653,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_T;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_S);
}
else if (e->direction == RESIZE_TR)
@ -2654,6 +2664,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_TR;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_SW);
}
else if (e->direction == RESIZE_R)
@ -2663,6 +2675,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_R;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_W);
}
else if (e->direction == RESIZE_BR)
@ -2672,6 +2686,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_BR;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_NW);
}
else if (e->direction == RESIZE_B)
@ -2681,6 +2697,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_B;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_N);
}
else if (e->direction == RESIZE_BL)
@ -2690,6 +2708,8 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_BL;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_NE);
}
else if (e->direction == RESIZE_L)
@ -2699,16 +2719,19 @@ _e_border_cb_window_move_resize_request(void *data, int ev_type, void *ev)
bd->resize_mode = RESIZE_L;
bd->cur_mouse_action = e_action_find("window_resize");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
GRAV_SET(bd, ECORE_X_GRAVITY_E);
}
else if (e->direction == MOVE)
{
if (!_e_border_move_begin(bd))
return 1;
bd->moving = 1;
bd->cur_mouse_action = e_action_find("window_move");
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
}
return 1;
}
@ -3177,6 +3200,8 @@ _e_border_cb_mouse_down(void *data, int type, void *event)
bd->cur_mouse_action =
e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_BORDER,
E_OBJECT(bd), ev);
if (bd->cur_mouse_action)
e_object_ref(E_OBJECT(bd->cur_mouse_action));
}
e_focus_event_mouse_down(bd);
}
@ -3255,6 +3280,7 @@ _e_border_cb_mouse_up(void *data, int type, void *event)
bd->cur_mouse_action->func.end_mouse(E_OBJECT(bd), "", ev);
else if (bd->cur_mouse_action->func.end)
bd->cur_mouse_action->func.end(E_OBJECT(bd), "");
e_object_unref(E_OBJECT(bd->cur_mouse_action));
bd->cur_mouse_action = NULL;
}
else

View File

@ -215,12 +215,12 @@ struct _E_Border
} strut;
unsigned char ping : 1;
struct {
unsigned char request : 1;
unsigned int wait;
Ecore_X_Sync_Alarm alarm;
Ecore_X_Sync_Counter counter;
unsigned int serial;
double time;
unsigned char request : 1;
unsigned int wait;
Ecore_X_Sync_Alarm alarm;
Ecore_X_Sync_Counter counter;
unsigned int serial;
double time; // FIXME: change
} sync;
/* NetWM Window state */

View File

@ -546,6 +546,12 @@ _e_zone_free(E_Zone *zone)
Evas_List *l;
int x, y;
if (zone->cur_mouse_action)
{
e_object_unref(E_OBJECT(zone->cur_mouse_action));
zone->cur_mouse_action = NULL;
}
/* remove handlers */
for (l = zone->handlers; l; l = l->next)
{
@ -565,10 +571,11 @@ _e_zone_free(E_Zone *zone)
evas_object_del(zone->bg_object);
/* free desks */
for (x = 0; x < zone->desk_x_count; x++)
for(y = 0; y < zone->desk_y_count; y++)
e_object_del(E_OBJECT(zone->desks[x + (y * zone->desk_x_count)]));
{
for(y = 0; y < zone->desk_y_count; y++)
e_object_del(E_OBJECT(zone->desks[x + (y * zone->desk_x_count)]));
}
free(zone->desks);
free(zone);
}
@ -592,6 +599,8 @@ _e_zone_cb_bg_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_i
zone->cur_mouse_action =
e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_ZONE,
E_OBJECT(zone), ev2);
if (zone->cur_mouse_action)
e_object_ref(E_OBJECT(zone->cur_mouse_action));
}
}
}
@ -616,6 +625,7 @@ _e_zone_cb_bg_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_inf
else if (zone->cur_mouse_action->func.end)
zone->cur_mouse_action->func.end(E_OBJECT(zone), "");
}
e_object_unref(E_OBJECT(zone->cur_mouse_action));
zone->cur_mouse_action = NULL;
}
else