Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
ecompmgr.c ecompmgr.h eobj.c eobj.h menus.c stacking.c
Log Message:
Fix incorrect damage region when raise actually lowers and vice versa
(do clip region update at proper point in sequence of things).
===================================================================
RCS file: /cvs/e/e16/e/src/ecompmgr.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -3 -r1.119 -r1.120
--- ecompmgr.c 1 Jun 2006 20:18:40 -0000 1.119
+++ ecompmgr.c 5 Jun 2006 20:57:07 -0000 1.120
@@ -1619,25 +1619,17 @@
}
void
-ECompMgrWinRaise(EObj * eo)
+ECompMgrWinRaiseLower(EObj * eo, int delta)
{
ECmWinInfo *cw = eo->cmhook;
- D1printf("ECompMgrWinRaise %#lx\n", EobjGetXwin(eo));
-
- _ECM_SET_STACK_CHANGED();
- ECompMgrDamageMergeObject(eo, cw->extents, 0);
-}
-
-void
-ECompMgrWinLower(EObj * eo)
-{
- ECmWinInfo *cw = eo->cmhook;
-
- D1printf("ECompMgrWinLower %#lx\n", EobjGetXwin(eo));
+ D1printf("ECompMgrWinRaiseLower %#lx delta=%d\n", EobjGetXwin(eo), delta);
+ if (delta < 0) /* Raise */
+ _ECM_SET_STACK_CHANGED();
ECompMgrDamageMergeObject(eo, cw->extents, 0);
- _ECM_SET_STACK_CHANGED();
+ if (delta > 0) /* Lower */
+ _ECM_SET_STACK_CHANGED();
}
void
@@ -2534,7 +2526,7 @@
if (eo && eo->type == EOBJ_TYPE_EXT && eo->cmhook)
{
eo->shown = 1;
- EobjListStackRaise(eo);
+ EobjListStackRaise(eo, 0);
ECompMgrWinMap(eo);
}
break;
===================================================================
RCS file: /cvs/e/e16/e/src/ecompmgr.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ecompmgr.h 1 Jun 2006 20:18:40 -0000 1.30
+++ ecompmgr.h 5 Jun 2006 20:57:07 -0000 1.31
@@ -49,8 +49,7 @@
void ECompMgrWinDamageArea(EObj * eo, int x, int y, int w,
int h);
void ECompMgrWinReparent(EObj * eo, Desk * dsk, int change_xy);
-void ECompMgrWinRaise(EObj * eo);
-void ECompMgrWinLower(EObj * eo);
+void ECompMgrWinRaiseLower(EObj * eo, int delta);
void ECompMgrWinChangeShape(EObj * eo);
void ECompMgrWinChangeOpacity(EObj * eo, unsigned int opacity);
Pixmap ECompMgrWinGetPixmap(const EObj * eo);
===================================================================
RCS file: /cvs/e/e16/e/src/eobj.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- eobj.c 3 Jun 2006 14:11:33 -0000 1.78
+++ eobj.c 5 Jun 2006 20:57:07 -0000 1.79
@@ -352,7 +352,7 @@
eo->shown = 1;
if (raise)
- EobjListStackRaise(eo);
+ EobjListStackRaise(eo, 0);
if (eo->stacked <= 0 || raise > 1)
DeskRestack(eo->desk);
@@ -472,13 +472,19 @@
{
int num;
- num = EobjListStackRaise(eo);
+ num = EobjListStackRaise(eo, 1);
if (num == 0)
return num;
+
+ if (num < 0)
+ num = EobjListStackRaise(eo, 0);
#if USE_COMPOSITE
if (eo->shown && eo->cmhook)
- ECompMgrWinRaise(eo);
+ ECompMgrWinRaiseLower(eo, num);
#endif
+ if (num > 0)
+ num = EobjListStackRaise(eo, 0);
+
return num;
}
@@ -487,13 +493,19 @@
{
int num;
- num = EobjListStackLower(eo);
+ num = EobjListStackLower(eo, 1);
if (num == 0)
return num;
+
+ if (num < 0)
+ num = EobjListStackLower(eo, 0);
#if USE_COMPOSITE
if (eo->shown && eo->cmhook)
- ECompMgrWinLower(eo);
+ ECompMgrWinRaiseLower(eo, num);
#endif
+ if (num > 0)
+ num = EobjListStackLower(eo, 0);
+
return num;
}
===================================================================
RCS file: /cvs/e/e16/e/src/eobj.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- eobj.h 21 May 2006 12:09:14 -0000 1.29
+++ eobj.h 5 Jun 2006 20:57:07 -0000 1.30
@@ -166,8 +166,8 @@
/* stacking.c */
void EobjListStackAdd(EObj * eo, int ontop);
void EobjListStackDel(EObj * eo);
-int EobjListStackRaise(EObj * eo);
-int EobjListStackLower(EObj * eo);
+int EobjListStackRaise(EObj * eo, int test);
+int EobjListStackLower(EObj * eo, int test);
int EobjListStackCheck(EObj * eo);
EObj *EobjListStackFind(Window win);
EObj *const *EobjListStackGet(int *num);
===================================================================
RCS file: /cvs/e/e16/e/src/menus.c,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -3 -r1.248 -r1.249
--- menus.c 3 Jun 2006 14:11:33 -0000 1.248
+++ menus.c 5 Jun 2006 20:57:07 -0000 1.249
@@ -984,7 +984,6 @@
EobjSetFloating(eo, 1);
EobjSetLayer(eo, 2);
- EobjListStackLower(eo);
ESelectInput(eo->win, ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask);
EventCallbackRegister(eo->win, 0, MenuMaskerHandleEvents, NULL);
===================================================================
RCS file: /cvs/e/e16/e/src/stacking.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- stacking.c 18 Apr 2006 17:57:58 -0000 1.33
+++ stacking.c 5 Jun 2006 20:57:07 -0000 1.34
@@ -41,8 +41,8 @@
char layered;
};
-static int EobjListRaise(EobjList * ewl, EObj * eo);
-static int EobjListLower(EobjList * ewl, EObj * eo);
+static int EobjListRaise(EobjList * ewl, EObj * eo, int test);
+static int EobjListLower(EobjList * ewl, EObj * eo, int test);
#if ENABLE_DEBUG_STACKING
static void
@@ -101,14 +101,14 @@
{
ewl->list[ewl->nwins] = eo;
ewl->nwins++;
- EobjListRaise(ewl, eo);
+ EobjListRaise(ewl, eo, 0);
}
else
{
memmove(ewl->list + 1, ewl->list, ewl->nwins * sizeof(EObj *));
ewl->list[0] = eo;
ewl->nwins++;
- EobjListLower(ewl, eo);
+ EobjListLower(ewl, eo, 0);
}
if (eo->stacked == 0)
DeskSetDirtyStack(eo->desk, eo);
@@ -158,7 +158,7 @@
}
static int
-EobjListLower(EobjList * ewl, EObj * eo)
+EobjListLower(EobjList * ewl, EObj * eo, int test)
{
int i, j, n;
@@ -179,6 +179,9 @@
}
n = j - i;
+ if (test)
+ return n;
+
if (n > 0)
{
memmove(ewl->list + i, ewl->list + i + 1, n * sizeof(EObj *));
@@ -199,7 +202,7 @@
}
static int
-EobjListRaise(EobjList * ewl, EObj * eo)
+EobjListRaise(EobjList * ewl, EObj * eo, int test)
{
int i, j, n;
@@ -220,6 +223,9 @@
}
n = j - i;
+ if (test)
+ return n;
+
if (n > 0)
{
memmove(ewl->list + i, ewl->list + i + 1, n * sizeof(EObj *));
@@ -308,15 +314,15 @@
}
int
-EobjListStackRaise(EObj * eo)
+EobjListStackRaise(EObj * eo, int test)
{
- return EobjListRaise(&EwinListStack, eo);
+ return EobjListRaise(&EwinListStack, eo, test);
}
int
-EobjListStackLower(EObj * eo)
+EobjListStackLower(EObj * eo, int test)
{
- return EobjListLower(&EwinListStack, eo);
+ return EobjListLower(&EwinListStack, eo, test);
}
void
@@ -334,7 +340,7 @@
int
EobjListFocusRaise(EObj * eo)
{
- return EobjListRaise(&EwinListFocus, eo);
+ return EobjListRaise(&EwinListFocus, eo, 0);
}
EWin *const *
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs