Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_apps.c e_atoms.c e_atoms.h e_border.c e_container.c e_gadman.c e_gadman.h e_int_menus.c e_main.c Log Message: handle xrandr properly (again) so u can change resolutions on the fly again, gadman handles this right, and fix restart properly - well its half arsed still, but works. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_apps.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- e_apps.c 5 Jan 2005 16:05:49 -0000 1.11 +++ e_apps.c 22 Jan 2005 05:21:48 -0000 1.12 @@ -362,7 +362,8 @@ /* if its "C" its the default - so drop it */ if ((lang) && (!strcmp(lang, "C"))) lang = NULL; - ef = eet_open(a->path, EET_FILE_MODE_READ); + if (!path) path = a->path; + ef = eet_open(path, EET_FILE_MODE_READ); if (!ef) return; if (lang) @@ -373,7 +374,6 @@ } else v = eet_read(ef, "app/info/name", &size); - if (v) { str = malloc(size + 1); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_atoms.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_atoms.c 22 Jan 2005 03:36:43 -0000 1.4 +++ e_atoms.c 22 Jan 2005 05:21:48 -0000 1.5 @@ -4,6 +4,7 @@ Ecore_X_Atom E_ATOM_MANAGED = 0; Ecore_X_Atom E_ATOM_DESK = 0; Ecore_X_Atom E_ATOM_ICONIC = 0; +Ecore_X_Atom E_ATOM_MAPPED = 0; /* externally accessible functions */ int @@ -12,6 +13,7 @@ E_ATOM_MANAGED = ecore_x_atom_get("__E_WINDOW_MANAGED"); E_ATOM_DESK = ecore_x_atom_get("__E_WINDOW_DESK"); E_ATOM_ICONIC = ecore_x_atom_get("__E_WINDOW_ICONIC"); + E_ATOM_MAPPED = ecore_x_atom_get("__E_WINDOW_MAPPED"); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_atoms.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- e_atoms.h 22 Jan 2005 03:36:43 -0000 1.5 +++ e_atoms.h 22 Jan 2005 05:21:48 -0000 1.6 @@ -9,6 +9,7 @@ /* basic window properties */ extern EAPI Ecore_X_Atom E_ATOM_DESK; extern EAPI Ecore_X_Atom E_ATOM_ICONIC; +extern EAPI Ecore_X_Atom E_ATOM_MAPPED; EAPI int e_atoms_init(void); EAPI int e_atoms_shutdown(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -3 -r1.79 -r1.80 --- e_border.c 22 Jan 2005 03:36:43 -0000 1.79 +++ e_border.c 22 Jan 2005 05:21:48 -0000 1.80 @@ -322,6 +322,7 @@ e_border_show(E_Border *bd) { E_Event_Border_Show *ev; + unsigned int visible; E_OBJECT_CHECK(bd); if (bd->visible) return; @@ -332,6 +333,9 @@ bd->changed = 1; bd->changes.visible = 1; + visible = 1; + ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &visible, 1); + ev = calloc(1, sizeof(E_Event_Border_Show)); ev->border = bd; /* SUSPICION: does the unref for this actually sometimes not get */ @@ -344,6 +348,7 @@ e_border_hide(E_Border *bd) { E_Event_Border_Hide *ev; + unsigned int visible; E_OBJECT_CHECK(bd); if (!bd->visible) return; @@ -360,6 +365,9 @@ bd->changed = 1; bd->changes.visible = 1; + visible = 0; + ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &visible, 1); + ev = calloc(1, sizeof(E_Event_Border_Hide)); ev->border = bd; /* SUSPICION: does the unref for this actually sometimes not get */ @@ -804,6 +812,7 @@ } iconic = 1; ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ICONIC, &iconic, 1); + ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1); } void @@ -826,6 +835,7 @@ } iconic = 0; ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_ICONIC, &iconic, 1); + ecore_x_window_prop_card32_set(bd->client.win, E_ATOM_MAPPED, &iconic, 1); } void @@ -883,9 +893,6 @@ static void _e_border_free(E_Border *bd) { - ecore_x_window_prop_property_del(bd->client.win, E_ATOM_MANAGED); - ecore_x_window_prop_property_del(bd->client.win, E_ATOM_DESK); - ecore_x_window_prop_property_del(bd->client.win, E_ATOM_ICONIC); while (bd->pending_move_resize) { free(bd->pending_move_resize->data); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- e_container.c 21 Jan 2005 15:45:56 -0000 1.22 +++ e_container.c 22 Jan 2005 05:21:48 -0000 1.23 @@ -378,11 +378,6 @@ evas_output_viewport_get(evas, NULL, NULL, &w, &h); o = evas_object_name_find(evas, "desktop/background"); con = evas_object_data_get(o, "e_container"); - /* FIXME: Handle resizing of zones if container is resized */ -#if 0 - evas_object_resize(con->bg_object, w, h); - evas_object_resize(con->bg_event_object, w, h); -#endif _e_container_resize_handle(con); } @@ -426,22 +421,60 @@ { E_Event_Container_Resize *ev; Evas_List *l; + int n, i; ev = calloc(1, sizeof(E_Event_Container_Resize)); ev->container = con; + /* FIXME: Handle resizing of zones if container is resized */ + n = ecore_x_xinerama_screen_count_get(); + if (n == 0) + { + if (con->zones) + { + E_Zone *zone; + + zone = con->zones->data; + e_zone_move(zone, 0, 0); + e_zone_resize(zone, con->w, con->h); + } + } + else + { + for (i = 0; i < n; i++) + { + int zx, zy, zw, zh; + + if (ecore_x_xinerama_screen_geometry_get(i, &zx, &zy, &zw, &zh)) + { + E_Zone *zone; + + zone = e_container_zone_number_get(con, i); + if (zone) + { + e_zone_move(zone, zx, zy); + e_zone_resize(zone, zw, zh); + } + } + } + } + e_gadman_container_resize(con->gadman); e_object_ref(E_OBJECT(con)); ecore_event_add(E_EVENT_CONTAINER_RESIZE, ev, _e_container_event_container_resize_free, NULL); for (l = con->clients; l; l = l->next) { - E_Border *b; - - b = l->data; + E_Border *bd; - if ((b->x + b->w) > con->w) e_border_move(b, con->w - b->w, b->y); - if (b->w > con->w) e_border_resize(b, con->w, b->h); + bd = l->data; - if ((b->y + b->h) > con->h) e_border_move(b, b->x, con->h - b->h); - if (b->h > con->h) e_border_resize(b, b->w, con->h); + if (bd->w > bd->zone->w) + e_border_resize(bd, bd->zone->w, bd->h); + if ((bd->x + bd->w) > (bd->zone->x + bd->zone->w)) + e_border_move(bd, bd->zone->x + bd->zone->w - bd->w, bd->y); + + if (bd->h > bd->zone->h) + e_border_resize(bd, bd->w, bd->zone->h); + if ((bd->y + bd->h) > (bd->zone->y + bd->zone->h)) + e_border_move(bd, bd->x, bd->zone->y + bd->zone->h - bd->h); } } =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_gadman.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_gadman.c 21 Jan 2005 15:45:56 -0000 1.14 +++ e_gadman.c 22 Jan 2005 05:21:48 -0000 1.15 @@ -135,6 +135,36 @@ return gm->mode; } +void +e_gadman_container_resize(E_Gadman *gm) +{ + Evas_List *l; + + E_OBJECT_CHECK(gm); + for (l = gm->clients; l; l = l->next) + { + E_Gadman_Client *gmc; + + gmc = l->data; + if (gmc->use_autow) + { + gmc->w = gmc->autow; + gmc->x = gmc->zone->x + ((gmc->zone->w - gmc->w) * gmc->ax); + } + if (gmc->use_autoh) + { + gmc->h = gmc->autoh; + gmc->y = gmc->zone->y + ((gmc->zone->h - gmc->h) * gmc->ay); + } + if (gmc->w > gmc->zone->w) gmc->w = gmc->zone->w; + if (gmc->h > gmc->zone->h) gmc->h = gmc->zone->h; + gmc->x = gmc->zone->x + ((gmc->zone->w - gmc->w) * gmc->ax); + gmc->y = gmc->zone->y + ((gmc->zone->h - gmc->h) * gmc->ay); + _e_gadman_client_overlap_deny(gmc); + _e_gadman_client_callback_call(gmc, E_GADMAN_CHANGE_MOVE_RESIZE); + } +} + E_Gadman_Client * e_gadman_client_new(E_Gadman *gm) { @@ -669,6 +699,7 @@ } iterate++; } + _e_gadman_client_geometry_to_align(gmc); } static void =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_gadman.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- e_gadman.h 21 Jan 2005 15:45:56 -0000 1.9 +++ e_gadman.h 22 Jan 2005 05:21:48 -0000 1.10 @@ -86,6 +86,7 @@ EAPI E_Gadman *e_gadman_new(E_Container *con); EAPI void e_gadman_mode_set(E_Gadman *gm, E_Gadman_Mode mode); EAPI E_Gadman_Mode e_gadman_mode_get(E_Gadman *gm); +EAPI void e_gadman_container_resize(E_Gadman *gm); EAPI E_Gadman_Client *e_gadman_client_new(E_Gadman *gm); EAPI void e_gadman_client_save(E_Gadman_Client *gmc); EAPI void e_gadman_client_edge_set(E_Gadman_Client *gmc, E_Gadman_Edge edge); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_menus.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- e_int_menus.c 17 Jan 2005 08:54:37 -0000 1.33 +++ e_int_menus.c 22 Jan 2005 05:21:48 -0000 1.34 @@ -257,7 +257,7 @@ { char buf[4096]; - snprintf(buf, sizeof(buf), "%s/.directory.eet", a->path); + snprintf(buf, sizeof(buf), "%s/.directory.eapp", a->path); e_menu_item_icon_edje_set(mi, buf, "icon"); e_menu_item_submenu_set(mi, e_int_menus_apps_new(a->path)); app_count++; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- e_main.c 22 Jan 2005 03:36:43 -0000 1.38 +++ e_main.c 22 Jan 2005 05:21:48 -0000 1.39 @@ -543,7 +543,13 @@ deskxy[1]); e_border_desk_set(bd, target); if (target == e_desk_current_get(bd->zone)) - e_border_show(bd); + { + ret = ecore_x_window_prop_card32_get(windows[i], + E_ATOM_MAPPED, + &ret_val, 1); + if ((ret > -1) && ret_val) + e_border_show(bd); + } } } ret = ecore_x_window_prop_card32_get(windows[i], ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs