From: <enl...@li...> - 2003-08-08 18:30:35
|
Enlightenment CVS committal Author : kwo Project : e16 Module : e Dir : e16/e/src Modified Files: ipc.c size.c Log Message: Minor bug fixes to maximise code. Spanning Xinerama screens now requires "xinerama". =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/ipc.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -3 -r1.109 -r1.110 --- ipc.c 12 Jul 2003 15:04:31 -0000 1.109 +++ ipc.c 8 Aug 2003 18:30:34 -0000 1.110 @@ -285,7 +285,7 @@ "win_op <windowid> annihilate\n win_op <windowid> iconify\n " "win_op <windowid> shade\n win_op <windowid> stick\n " "win_op <windowid> toggle_<width/height/size> " - "<conservative/available>\n (or none for absolute)\n " + "<conservative/available/xinerama>\n (or none for absolute)\n " "win_op <windowid> border <BORDERNAME>\n win_op <windowid> " "desk <desktochangeto/next/prev>\n win_op <windowid> " "area <x> <y>\n win_op <windowid> <raise/lower>\n " =================================================================== RCS file: /cvsroot/enlightenment/e16/e/src/size.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- size.c 20 Jul 2003 18:02:16 -0000 1.27 +++ size.c 8 Aug 2003 18:30:34 -0000 1.28 @@ -26,9 +26,10 @@ #define MAX_HOR 0x1 #define MAX_VER 0x2 -#define MAX_ABSOLUTE 0 -#define MAX_AVAILABLE 1 -#define MAX_CONSERVATIVE 2 +#define MAX_ABSOLUTE 0 /* Fill screen */ +#define MAX_AVAILABLE 1 /* Expand until don't cover */ +#define MAX_CONSERVATIVE 2 /* Expand until something */ +#define MAX_XINERAMA 3 /* Fill Xinerama screen */ static void MaxSizeHV(EWin * ewin, char *resize_type, int direction) @@ -51,22 +52,27 @@ goto exit; } - if ((resize_type) && (!strcmp(resize_type, "available"))) + type = MAX_ABSOLUTE; /* Select default */ + if (!resize_type) + ; + else if (!strcmp(resize_type, "absolute")) + type = MAX_ABSOLUTE; + else if (!strcmp(resize_type, "available")) type = MAX_AVAILABLE; - else if ((resize_type) && (!strcmp(resize_type, "conservative"))) + else if (!strcmp(resize_type, "conservative")) type = MAX_CONSERVATIVE; - else - type = MAX_ABSOLUTE; + else if (!strcmp(resize_type, "xinerama")) + type = MAX_XINERAMA; /* Default is no change */ y = ewin->y; - h = ewin->h; x = ewin->x; - w = ewin->w; + h = ewin->client.h; + w = ewin->client.w; switch (type) { - case MAX_ABSOLUTE: + case MAX_XINERAMA: if (direction & MAX_HOR) { x = 0; @@ -81,12 +87,9 @@ } break; - case MAX_CONSERVATIVE: + case MAX_ABSOLUTE: case MAX_AVAILABLE: - lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN); - if (!lst) - break; - + case MAX_CONSERVATIVE: ScreenGetGeometry(ewin->x, ewin->y, &x1, &y1, &x2, &y2); x2 += x1; y2 += y1; @@ -105,6 +108,17 @@ } #endif + if (type == MAX_ABSOLUTE) + { + /* Simply ignore all windows */ + lst = NULL; + num = 0; + } + else + { + lst = (EWin **) ListItemType(&num, LIST_TYPE_EWIN); + } + if (direction & MAX_VER) { for (i = 0; i < num; i++) @@ -116,7 +130,7 @@ pe->ignorearrange || (ewin->desktop != pe->desktop && !pe->sticky) || (pe->type & (EWIN_TYPE_DIALOG | EWIN_TYPE_MENU)) || - (type == MAX_AVAILABLE && pe->never_use_area) || + (type == MAX_AVAILABLE && !pe->never_use_area) || !SPANS_COMMON(x, w, pe->x, pe->w)) continue; @@ -141,7 +155,7 @@ pe->ignorearrange || (ewin->desktop != pe->desktop && !pe->sticky) || (pe->type & (EWIN_TYPE_DIALOG | EWIN_TYPE_MENU)) || - (type == MAX_AVAILABLE && pe->never_use_area) || + (type == MAX_AVAILABLE && !pe->never_use_area) || !SPANS_COMMON(y, h, pe->y, pe->h)) continue; @@ -155,7 +169,8 @@ ewin->border->border.right); } - Efree(lst); + if (lst) + Efree(lst); break; } |