Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
stacking.c
Log Message:
Fix stacking after layer change.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/stacking.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- stacking.c 8 Apr 2004 12:54:46 -0000 1.9
+++ stacking.c 8 Apr 2004 13:07:00 -0000 1.10
@@ -130,9 +130,11 @@
if (mode)
{
/* Take the layer into account */
- for (; j > i; j--)
- if (ewin->layer <= ewl->list[j]->layer)
+ for (; j >= 0; j--)
+ if (i != j && ewin->layer <= ewl->list[j]->layer)
break;
+ if (j < i)
+ j++;
}
n = j - i;
@@ -141,6 +143,11 @@
memmove(ewl->list + i, ewl->list + i + 1, n * sizeof(EWin *));
ewl->list[j] = ewin;
}
+ else if (n < 0)
+ {
+ memmove(ewl->list + j + 1, ewl->list + j, -n * sizeof(EWin *));
+ ewl->list[j] = ewin;
+ }
EwinListShow("EwinListLower", ewl);
return n;
@@ -160,15 +167,22 @@
if (mode)
{
/* Take the layer into account */
- for (; j < i; j++)
- if (ewin->layer >= ewl->list[j]->layer)
+ for (; j < ewl->nwins; j++)
+ if (j != i && ewin->layer >= ewl->list[j]->layer)
break;
+ if (j > i)
+ j--;
}
- n = i - j;
+ n = j - i;
if (n > 0)
{
- memmove(ewl->list + j + 1, ewl->list + j, n * sizeof(EWin *));
+ memmove(ewl->list + i, ewl->list + i + 1, n * sizeof(EWin *));
+ ewl->list[j] = ewin;
+ }
+ else if (n < 0)
+ {
+ memmove(ewl->list + j + 1, ewl->list + j, -n * sizeof(EWin *));
ewl->list[j] = ewin;
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs