Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_zone.c e_zone.h Log Message: patches, caching fixes, zone dynamic creation/deletion handling, stuff. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.614 retrieving revision 1.615 diff -u -3 -r1.614 -r1.615 --- e_border.c 9 Dec 2007 15:40:14 -0000 1.614 +++ e_border.c 14 Dec 2007 05:57:15 -0000 1.615 @@ -738,7 +738,8 @@ e_border_focus_set(bd, 0, 1); if (manage != 2) { - if (e_config->focus_policy == E_FOCUS_CLICK && e_config->focus_revert_on_hide_or_close) + if ((e_config->focus_policy == E_FOCUS_CLICK) && + (e_config->focus_revert_on_hide_or_close)) e_desk_last_focused_focus(bd->desk); } } @@ -1353,6 +1354,10 @@ e_border_focus_set_with_pointer(E_Border *bd) { if (e_config->focus_policy == E_FOCUS_SLOPPY) + { + e_border_focus_set(bd, 1, 1); + } + else if (e_config->focus_policy == E_FOCUS_MOUSE) { if (e_border_under_pointer_get(NULL, bd)) { =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -3 -r1.128 -r1.129 --- e_zone.c 2 Dec 2007 20:19:21 -0000 1.128 +++ e_zone.c 14 Dec 2007 05:57:15 -0000 1.129 @@ -17,10 +17,16 @@ static int _e_zone_cb_timer(void *data); static int _e_zone_cb_desk_show(void *data, int type, void *event); static void _e_zone_update_flip(E_Zone *zone); +static void _e_zone_event_move_resize_free(void *data, void *ev); +static void _e_zone_event_add_free(void *data, void *ev); +static void _e_zone_event_del_free(void *data, void *ev); +static void _e_zone_object_del_attach(void *o); EAPI int E_EVENT_ZONE_DESK_COUNT_SET = 0; EAPI int E_EVENT_POINTER_WARP = 0; EAPI int E_EVENT_ZONE_MOVE_RESIZE = 0; +EAPI int E_EVENT_ZONE_ADD = 0; +EAPI int E_EVENT_ZONE_DEL = 0; /* FIXME: We need a EDGE_MOVE event */ EAPI int E_EVENT_ZONE_EDGE_IN = 0; EAPI int E_EVENT_ZONE_EDGE_OUT = 0; @@ -36,6 +42,8 @@ E_EVENT_ZONE_DESK_COUNT_SET = ecore_event_type_new(); E_EVENT_POINTER_WARP = ecore_event_type_new(); E_EVENT_ZONE_MOVE_RESIZE = ecore_event_type_new(); + E_EVENT_ZONE_ADD = ecore_event_type_new(); + E_EVENT_ZONE_DEL = ecore_event_type_new(); E_EVENT_ZONE_EDGE_IN = ecore_event_type_new(); E_EVENT_ZONE_EDGE_OUT = ecore_event_type_new(); return 1; @@ -53,6 +61,7 @@ E_Zone *zone; char name[40]; Evas_Object *o; + E_Event_Zone_Add *ev; zone = E_OBJECT_ALLOC(E_Zone, E_ZONE_TYPE, _e_zone_free); if (!zone) return NULL; @@ -141,6 +150,14 @@ e_config->zone_desks_y_count); _e_zone_update_flip(zone); + + e_object_del_attach_func_set(E_OBJECT(zone), _e_zone_object_del_attach); + + ev = E_NEW(E_Event_Zone_Add, 1); + ev->zone = zone; + e_object_ref(E_OBJECT(ev->zone)); + ecore_event_add(E_EVENT_ZONE_ADD, ev, _e_zone_event_add_free, NULL); + return zone; } @@ -170,7 +187,8 @@ ev = E_NEW(E_Event_Zone_Move_Resize, 1); ev->zone = zone; - ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, NULL, NULL); + e_object_ref(E_OBJECT(ev->zone)); + ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, _e_zone_event_move_resize_free, NULL); ecore_x_window_move_resize(zone->edge.left, zone->x, zone->y, 1, zone->h); ecore_x_window_move_resize(zone->edge.right, zone->x + zone->w - 1, zone->y, 1, zone->h); @@ -195,7 +213,8 @@ ev = E_NEW(E_Event_Zone_Move_Resize, 1); ev->zone = zone; - ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, NULL, NULL); + e_object_ref(E_OBJECT(ev->zone)); + ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, _e_zone_event_move_resize_free, NULL); ecore_x_window_move_resize(zone->edge.left, zone->x, zone->y, 1, zone->h); ecore_x_window_move_resize(zone->edge.right, zone->x + zone->w - 1, zone->y, 1, zone->h); @@ -228,7 +247,8 @@ ev = E_NEW(E_Event_Zone_Move_Resize, 1); ev->zone = zone; - ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, NULL, NULL); + e_object_ref(E_OBJECT(ev->zone)); + ecore_event_add(E_EVENT_ZONE_MOVE_RESIZE, ev, _e_zone_event_move_resize_free, NULL); ecore_x_window_move_resize(zone->edge.left, zone->x, zone->y, 1, zone->h); ecore_x_window_move_resize(zone->edge.right, zone->x + zone->w - 1, zone->y, 1, zone->h); @@ -468,7 +488,7 @@ ev = E_NEW(E_Event_Zone_Desk_Count_Set, 1); if (!ev) return; ev->zone = zone; - e_object_ref(E_OBJECT(zone)); + e_object_ref(E_OBJECT(ev->zone)); ecore_event_add(E_EVENT_ZONE_DESK_COUNT_SET, ev, _e_zone_event_zone_desk_count_set_free, NULL); } @@ -1018,3 +1038,48 @@ zone->flip.bottom = 1; } } + +static void +_e_zone_event_move_resize_free(void *data, void *ev) +{ + E_Event_Zone_Move_Resize *e; + + e = ev; + e_object_unref(E_OBJECT(e->zone)); + free(e); +} + +static void +_e_zone_event_add_free(void *data, void *ev) +{ + E_Event_Zone_Add *e; + + e = ev; + e_object_unref(E_OBJECT(e->zone)); + free(e); +} + +static void +_e_zone_event_del_free(void *data, void *ev) +{ + E_Event_Zone_Del *e; + + e = ev; + e_object_unref(E_OBJECT(e->zone)); + free(e); +} + +static void +_e_zone_object_del_attach(void *o) +{ + E_Zone *zone; + E_Event_Zone_Del *ev; + + if (e_object_is_del(E_OBJECT(o))) return; + zone = o; + ev = E_NEW(E_Event_Zone_Del, 1); + ev->zone = zone; + e_object_ref(E_OBJECT(ev->zone)); + ecore_event_add(E_EVENT_ZONE_DEL, ev, _e_zone_event_del_free, NULL); +} + =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.h,v retrieving revision 1.46 retrieving revision 1.47 diff -u -3 -r1.46 -r1.47 --- e_zone.h 22 Nov 2007 20:48:15 -0000 1.46 +++ e_zone.h 14 Dec 2007 05:57:15 -0000 1.47 @@ -15,6 +15,8 @@ typedef struct _E_Event_Zone_Desk_Count_Set E_Event_Zone_Desk_Count_Set; typedef struct _E_Event_Zone_Move_Resize E_Event_Zone_Move_Resize; +typedef struct _E_Event_Zone_Add E_Event_Zone_Add; +typedef struct _E_Event_Zone_Del E_Event_Zone_Del; /* TODO: Move this to a general place? */ typedef struct _E_Event_Pointer_Warp E_Event_Pointer_Warp; typedef struct _E_Event_Zone_Edge E_Event_Zone_Edge_In; @@ -82,6 +84,16 @@ E_Zone *zone; }; +struct _E_Event_Zone_Add +{ + E_Zone *zone; +}; + +struct _E_Event_Zone_Del +{ + E_Zone *zone; +}; + struct _E_Event_Pointer_Warp { struct { @@ -123,6 +135,8 @@ extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET; extern EAPI int E_EVENT_ZONE_MOVE_RESIZE; +extern EAPI int E_EVENT_ZONE_ADD; +extern EAPI int E_EVENT_ZONE_DEL; extern EAPI int E_EVENT_POINTER_WARP; extern EAPI int E_EVENT_ZONE_EDGE_IN; extern EAPI int E_EVENT_ZONE_EDGE_OUT; ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs