Some support for multiple containers -- map new windows to the currently visible container rather than the first.

SVN revision: 12773
devs/princeamd/enlightenment-0.17-elive
xcomputerman 19 years ago committed by xcomputerman
parent 477d160e1f
commit 9b89c81a65
  1. 1
      AUTHORS
  2. 23
      src/bin/e_container.c
  3. 4
      src/bin/e_container.h
  4. 2
      src/bin/e_int_menus.c
  5. 5
      src/bin/e_manager.c
  6. 16
      src/bin/e_manager.h

@ -1,2 +1,3 @@
The Rasterman (Carsten Haitzler) <raster@rasterman.com>
Ibukun Olumuyiwa <ibukun@computer.org>

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* TODO List:
@ -38,6 +41,7 @@ e_container_new(E_Manager *man)
E_Container *con;
E_Zone *zone;
Evas_Object *o;
char name[40];
con = E_OBJECT_ALLOC(E_Container, _e_container_free);
if (!con) return NULL;
@ -72,6 +76,10 @@ e_container_new(E_Manager *man)
e_pointer_container_set(con);
con->num = evas_list_count(con->manager->containers);
snprintf(name, sizeof(name), "Container %d", con->num);
con->name = strdup(name);
/* FIXME: Add ecore code to fetch xinerama screens for zones */
zone = e_zone_new(con, 0, 0, con->w, con->h);
@ -97,6 +105,21 @@ e_container_hide(E_Container *con)
con->visible = 0;
}
E_Container *
e_container_current_get(E_Manager *man)
{
Evas_List *l;
E_OBJECT_CHECK_RETURN(man, NULL);
for (l = man->containers; l; l = l->next)
{
E_Container *con = l->data;
if (con->visible)
return con;
}
return NULL;
}
void
e_container_move(E_Container *con, int x, int y)
{

@ -26,6 +26,9 @@ struct _E_Container
char visible : 1;
E_Manager *manager;
int num;
char *name;
Ecore_Evas *bg_ecore_evas;
Evas *bg_evas;
Evas_Object *bg_blank_object;
@ -64,6 +67,7 @@ EAPI int e_container_shutdown(void);
EAPI E_Container *e_container_new(E_Manager *man);
EAPI void e_container_show(E_Container *con);
EAPI void e_container_hide(E_Container *con);
EAPI E_Container *e_container_current_get(E_Manager *man);
EAPI void e_container_move(E_Container *con, int x, int y);
EAPI void e_container_resize(E_Container *con, int w, int h);
EAPI void e_container_move_resize(E_Container *con, int x, int y, int w, int h);

@ -304,7 +304,7 @@ _e_int_menus_desktops_pre_cb(void *data, E_Menu *m)
m->items = NULL;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, "Add New Desktop");
e_menu_item_label_set(mi, "New Desktop");
e_menu_item_callback_set(mi, _e_int_menus_desktops_add_cb, NULL);
mi = e_menu_item_new(m);

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* local subsystem functions */
@ -185,7 +188,7 @@ _e_manager_cb_window_show_request(void *data, int ev_type, void *ev)
E_Container *con;
E_Border *bd;
con = man->containers->data;
con = e_container_current_get(man);
if (!e_border_find_by_client_window(e->win))
{
bd = e_border_new(con, e->win, 0);

@ -19,13 +19,13 @@ EAPI int e_manager_init(void);
EAPI int e_manager_shutdown(void);
EAPI Evas_List *e_manager_list(void);
EAPI E_Manager *e_manager_new(Ecore_X_Window root);
EAPI void e_manager_show(E_Manager *man);
EAPI void e_manager_hide(E_Manager *man);
EAPI void e_manager_move(E_Manager *man, int x, int y);
EAPI void e_manager_resize(E_Manager *man, int w, int h);
EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int w, int h);
EAPI void e_manager_raise(E_Manager *man);
EAPI void e_manager_lower(E_Manager *man);
EAPI E_Manager *e_manager_new(Ecore_X_Window root);
EAPI void e_manager_show(E_Manager *man);
EAPI void e_manager_hide(E_Manager *man);
EAPI void e_manager_move(E_Manager *man, int x, int y);
EAPI void e_manager_resize(E_Manager *man, int w, int h);
EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int w, int h);
EAPI void e_manager_raise(E_Manager *man);
EAPI void e_manager_lower(E_Manager *man);
#endif

Loading…
Cancel
Save