forked from enlightenment/enlightenment
xinerama support work-infra in for xrandr1.2 and comments as to what is needed.
SVN revision: 32100
This commit is contained in:
parent
d5942ea076
commit
2dc7874df7
|
@ -166,12 +166,12 @@ e_container_new(E_Manager *man)
|
||||||
E_Screen *scr;
|
E_Screen *scr;
|
||||||
|
|
||||||
scr = l->data;
|
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
|
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;
|
return con;
|
||||||
}
|
}
|
||||||
|
@ -340,6 +340,24 @@ e_container_zone_number_get(E_Container *con, int num)
|
||||||
return NULL;
|
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 *
|
EAPI E_Container_Shape *
|
||||||
e_container_shape_add(E_Container *con)
|
e_container_shape_add(E_Container *con)
|
||||||
{
|
{
|
||||||
|
@ -1165,7 +1183,7 @@ static void
|
||||||
_e_container_resize_handle(E_Container *con)
|
_e_container_resize_handle(E_Container *con)
|
||||||
{
|
{
|
||||||
E_Event_Container_Resize *ev;
|
E_Event_Container_Resize *ev;
|
||||||
Evas_List *l, *screens;
|
Evas_List *l, *screens, *zones = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ev = calloc(1, sizeof(E_Event_Container_Resize));
|
ev = calloc(1, sizeof(E_Event_Container_Resize));
|
||||||
|
@ -1174,28 +1192,52 @@ _e_container_resize_handle(E_Container *con)
|
||||||
|
|
||||||
e_xinerama_update();
|
e_xinerama_update();
|
||||||
screens = (Evas_List *)e_xinerama_screens_get();
|
screens = (Evas_List *)e_xinerama_screens_get();
|
||||||
|
|
||||||
if (screens)
|
if (screens)
|
||||||
{
|
{
|
||||||
|
for (l = con->zones; l; l = l->next)
|
||||||
|
zones = evas_list_append(zones, l->data);
|
||||||
for (l = screens; l; l = l->next)
|
for (l = screens; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Screen *scr;
|
E_Screen *scr;
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
scr = l->data;
|
scr = l->data;
|
||||||
zone = e_container_zone_number_get(con, scr->screen);
|
zone = e_container_zone_id_get(con, scr->escreen);
|
||||||
if (zone)
|
if (zone)
|
||||||
{
|
{
|
||||||
e_zone_move_resize(zone, scr->x, scr->y, scr->w, scr->h);
|
e_zone_move_resize(zone, scr->x, scr->y, scr->w, scr->h);
|
||||||
e_shelf_zone_move_resize_handle(zone);
|
e_shelf_zone_move_resize_handle(zone);
|
||||||
|
zones = evas_list_remove(zones, zone);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
zone = e_zone_new(con, scr->screen, scr->x, scr->y, scr->w, scr->h);
|
|
||||||
}
|
|
||||||
if (evas_list_count(con->zones) != evas_list_count(screens))
|
|
||||||
{
|
{
|
||||||
/* xinerama screens where deleted! eek! */
|
zone = e_zone_new(con, scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
|
||||||
/* FIXME: handle deletion of a zone! */
|
// ...
|
||||||
printf("FIXME: handle deletion of xinerama screens\n");
|
// ...
|
||||||
|
/* FIXME: if there were shelves for this zone - create them */
|
||||||
|
// ....
|
||||||
|
// ...
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (zones)
|
||||||
|
{
|
||||||
|
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
|
else
|
||||||
|
|
|
@ -109,6 +109,7 @@ EAPI void e_container_border_list_free(E_Border_List *list);
|
||||||
|
|
||||||
EAPI E_Zone *e_container_zone_at_point_get(E_Container *con, int x, int y);
|
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_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 E_Container_Shape *e_container_shape_add(E_Container *con);
|
||||||
EAPI void e_container_shape_show(E_Container_Shape *es);
|
EAPI void e_container_shape_show(E_Container_Shape *es);
|
||||||
|
|
|
@ -199,7 +199,7 @@ _e_xinerama_update(void)
|
||||||
scr = l->data;
|
scr = l->data;
|
||||||
printf("E17 INIT: XINERAMA CHOSEN: [%i], %ix%i+%i+%i\n",
|
printf("E17 INIT: XINERAMA CHOSEN: [%i], %ix%i+%i+%i\n",
|
||||||
scr->screen, scr->w, scr->h, scr->x, scr->y);
|
scr->screen, scr->w, scr->h, scr->x, scr->y);
|
||||||
scr->screen = n;
|
scr->escreen = n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ typedef struct _E_Screen E_Screen;
|
||||||
|
|
||||||
struct _E_Screen
|
struct _E_Screen
|
||||||
{
|
{
|
||||||
int screen;
|
int screen, escreen;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ e_zone_shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Zone *
|
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;
|
E_Zone *zone;
|
||||||
char name[40];
|
char name[40];
|
||||||
|
@ -60,6 +60,7 @@ e_zone_new(E_Container *con, int num, int x, int y, int w, int h)
|
||||||
zone->w = w;
|
zone->w = w;
|
||||||
zone->h = h;
|
zone->h = h;
|
||||||
zone->num = num;
|
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.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);
|
zone->flip.right = ecore_x_window_input_new(con->win, zone->x + zone->w - 1, zone->y, 1, zone->h);
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct _E_Zone
|
||||||
Ecore_Evas *black_ecore_evas;
|
Ecore_Evas *black_ecore_evas;
|
||||||
Evas *black_evas;
|
Evas *black_evas;
|
||||||
Ecore_X_Window black_win;
|
Ecore_X_Window black_win;
|
||||||
|
int id;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Event_Zone_Desk_Count_Set
|
struct _E_Event_Zone_Desk_Count_Set
|
||||||
|
@ -76,7 +77,7 @@ struct _E_Event_Pointer_Warp
|
||||||
|
|
||||||
EAPI int e_zone_init(void);
|
EAPI int e_zone_init(void);
|
||||||
EAPI int e_zone_shutdown(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_name_set(E_Zone *zone, const char *name);
|
||||||
EAPI void e_zone_move(E_Zone *zone, int x, int y);
|
EAPI void e_zone_move(E_Zone *zone, int x, int y);
|
||||||
EAPI void e_zone_resize(E_Zone *zone, int w, int h);
|
EAPI void e_zone_resize(E_Zone *zone, int w, int h);
|
||||||
|
|
Loading…
Reference in New Issue