Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_config.c e_config.h
Log Message:
smart maximize.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -3 -r1.259 -r1.260
--- e_border.c 16 Jun 2005 15:00:58 -0000 1.259
+++ e_border.c 16 Jun 2005 22:23:25 -0000 1.260
@@ -1069,9 +1069,53 @@
e_hints_window_maximized_set(bd, 1);
- /* FIXME maximize intelligently */
e_border_raise(bd);
- e_border_move_resize(bd, bd->zone->x, bd->zone->y, bd->zone->w,
bd->zone->h);
+ if (e_config->smart_maximize)
+ {
+ Evas_List *l;
+ int x1, y1, x2, y2;
+
+ x1 = bd->zone->x;
+ y1 = bd->zone->y;
+ x2 = bd->zone->x + bd->zone->w;
+ y2 = bd->zone->y + bd->zone->h;
+
+ /* walk through all gadgets */
+ /* FIXME: Should we care about clients that aren't aligned to */
+ /* one edge? */
+ for (l = bd->zone->container->gadman->clients; l; l = l->next)
+ {
+ E_Gadman_Client *gmc;
+
+ gmc = l->data;
+ if ((gmc->zone != bd->zone) ||
+ ((gmc->policy & 0xff) != E_GADMAN_POLICY_EDGES))
+ continue;
+ switch (gmc->edge)
+ {
+ case E_GADMAN_EDGE_LEFT:
+ if ((gmc->x + gmc->w) > x1)
+ x1 = (gmc->x + gmc->w);
+ break;
+ case E_GADMAN_EDGE_RIGHT:
+ if (gmc->x < x2)
+ x2 = gmc->x;
+ break;
+ case E_GADMAN_EDGE_TOP:
+ if ((gmc->y + gmc->h) > y1)
+ y1 = (gmc->y + gmc->h);
+ break;
+ case E_GADMAN_EDGE_BOTTOM:
+ if (gmc->y < y2)
+ y2 = gmc->y;
+ break;
+ }
+ }
+ /* FIXME: walk through docks and toolbars */
+ e_border_move_resize(bd, x1, y1, x2 - x1, y2 - y1);
+ }
+ else
+ e_border_move_resize(bd, bd->zone->x, bd->zone->y, bd->zone->w,
bd->zone->h);
bd->maximized = 1;
bd->changes.pos = 1;
bd->changes.size = 1;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- e_config.c 15 Jun 2005 10:22:41 -0000 1.61
+++ e_config.c 16 Jun 2005 22:23:25 -0000 1.62
@@ -168,6 +168,7 @@
E_CONFIG_VAL(D, T, winlist_pos_min_h, INT);
E_CONFIG_VAL(D, T, winlist_pos_max_w, INT);
E_CONFIG_VAL(D, T, winlist_pos_max_h, INT);
+ E_CONFIG_VAL(D, T, smart_maximize, INT);
e_config = e_config_domain_load("e", _e_config_edd);
if (e_config)
@@ -258,6 +259,7 @@
e_config->winlist_pos_min_h = 0;
e_config->winlist_pos_max_w = 320;
e_config->winlist_pos_max_h = 320;
+ e_config->smart_maximize = 1;
{
E_Config_Module *em;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- e_config.h 14 Jun 2005 10:19:25 -0000 1.30
+++ e_config.h 16 Jun 2005 22:23:25 -0000 1.31
@@ -46,7 +46,7 @@
* defaults for e to work - started at 100 when we introduced this config
* versioning feature
*/
-#define E_CONFIG_FILE_VERSION 111
+#define E_CONFIG_FILE_VERSION 112
#define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1
@@ -122,6 +122,7 @@
int winlist_pos_min_h;
int winlist_pos_max_w;
int winlist_pos_max_h;
+ int smart_maximize;
};
/* FIXME: all of thsie needs to become eet lumps for enmcode/decode */
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs