Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_container.c e_container.h e_xinerama.c e_xinerama.h e_zone.c e_zone.h Log Message: xinerama support work-infra in for xrandr1.2 and comments as to what is needed. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_container.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -3 -r1.119 -r1.120 --- e_container.c 3 Oct 2007 07:13:02 -0000 1.119 +++ e_container.c 17 Oct 2007 11:06:59 -0000 1.120 @@ -166,12 +166,12 @@ E_Screen *scr; scr = l->data; - zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h); + zone = e_zone_new(con, scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h); } } else { - zone = e_zone_new(con, 0, 0, 0, con->w, con->h); + zone = e_zone_new(con, 0, 0, 0, 0, con->w, con->h); } return con; } @@ -340,6 +340,24 @@ return NULL; } +EAPI E_Zone * +e_container_zone_id_get(E_Container *con, int id) +{ + Evas_List *l; + + E_OBJECT_CHECK_RETURN(con, NULL); + E_OBJECT_TYPE_CHECK_RETURN(con, E_CONTAINER_TYPE, NULL); + for (l = con->zones; l; l = l->next) + { + E_Zone *zone; + + zone = l->data; + if (zone->id == id) + return zone; + } + return NULL; +} + EAPI E_Container_Shape * e_container_shape_add(E_Container *con) { @@ -1165,7 +1183,7 @@ _e_container_resize_handle(E_Container *con) { E_Event_Container_Resize *ev; - Evas_List *l, *screens; + Evas_List *l, *screens, *zones = NULL; int i; ev = calloc(1, sizeof(E_Event_Container_Resize)); @@ -1174,28 +1192,52 @@ e_xinerama_update(); screens = (Evas_List *)e_xinerama_screens_get(); + if (screens) { + for (l = con->zones; l; l = l->next) + zones = evas_list_append(zones, l->data); for (l = screens; l; l = l->next) { E_Screen *scr; E_Zone *zone; scr = l->data; - zone = e_container_zone_number_get(con, scr->screen); + zone = e_container_zone_id_get(con, scr->escreen); if (zone) { e_zone_move_resize(zone, scr->x, scr->y, scr->w, scr->h); e_shelf_zone_move_resize_handle(zone); + zones = evas_list_remove(zones, zone); } else - zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h); + { + zone = e_zone_new(con, scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h); + // ... + // ... + /* FIXME: if there were shelves for this zone - create them */ + // .... + // ... + // ... + } } - if (evas_list_count(con->zones) != evas_list_count(screens)) + if (zones) { - /* xinerama screens where deleted! eek! */ - /* FIXME: handle deletion of a zone! */ - printf("FIXME: handle deletion of xinerama screens\n"); + while (zones) + { + E_Zone *zone; + + zone = zones->data; + /* FIXME: any shelves for this zone - kill them */ + /* FIXME: take all borders in the zone and move elsewhere */ + // ... + // ... + //e_border_zone_set(bd, new_zone); + // ... + // ... + e_object_del(E_OBJECT(zone)); + zones = evas_list_remove_list(zones, zones); + } } } else =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_container.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- e_container.h 20 Aug 2006 04:48:27 -0000 1.35 +++ e_container.h 17 Oct 2007 11:06:59 -0000 1.36 @@ -109,6 +109,7 @@ EAPI E_Zone *e_container_zone_at_point_get(E_Container *con, int x, int y); EAPI E_Zone *e_container_zone_number_get(E_Container *con, int num); +EAPI E_Zone *e_container_zone_id_get(E_Container *con, int id); EAPI E_Container_Shape *e_container_shape_add(E_Container *con); EAPI void e_container_shape_show(E_Container_Shape *es); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_xinerama.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- e_xinerama.c 16 Oct 2007 15:34:07 -0000 1.8 +++ e_xinerama.c 17 Oct 2007 11:06:59 -0000 1.9 @@ -199,7 +199,7 @@ scr = l->data; printf("E17 INIT: XINERAMA CHOSEN: [%i], %ix%i+%i+%i\n", scr->screen, scr->w, scr->h, scr->x, scr->y); - scr->screen = n; + scr->escreen = n; } } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_xinerama.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- e_xinerama.h 19 Mar 2005 17:31:42 -0000 1.3 +++ e_xinerama.h 17 Oct 2007 11:06:59 -0000 1.4 @@ -11,7 +11,7 @@ struct _E_Screen { - int screen; + int screen, escreen; int x, y, w, h; }; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.c,v retrieving revision 1.122 retrieving revision 1.123 diff -u -3 -r1.122 -r1.123 --- e_zone.c 13 Aug 2007 06:02:40 -0000 1.122 +++ e_zone.c 17 Oct 2007 11:06:59 -0000 1.123 @@ -44,7 +44,7 @@ } EAPI E_Zone * -e_zone_new(E_Container *con, int num, int x, int y, int w, int h) +e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h) { E_Zone *zone; char name[40]; @@ -60,6 +60,7 @@ zone->w = w; zone->h = h; zone->num = num; + zone->id = id; zone->flip.left = ecore_x_window_input_new(con->win, zone->x, zone->y, 1, zone->h); zone->flip.right = ecore_x_window_input_new(con->win, zone->x + zone->w - 1, zone->y, 1, zone->h); =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- e_zone.h 12 Aug 2007 09:57:24 -0000 1.42 +++ e_zone.h 17 Oct 2007 11:06:59 -0000 1.43 @@ -52,6 +52,7 @@ Ecore_Evas *black_ecore_evas; Evas *black_evas; Ecore_X_Window black_win; + int id; }; struct _E_Event_Zone_Desk_Count_Set @@ -76,7 +77,7 @@ EAPI int e_zone_init(void); EAPI int e_zone_shutdown(void); -EAPI E_Zone *e_zone_new(E_Container *con, int num, int x, int y, int w, int h); +EAPI E_Zone *e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h); EAPI void e_zone_name_set(E_Zone *zone, const char *name); EAPI void e_zone_move(E_Zone *zone, int x, int y); EAPI void e_zone_resize(E_Zone *zone, int w, int h); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs