diff options
author | Sebastian Geerken <devnull@localhost> | 2014-12-13 12:34:41 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-12-13 12:34:41 +0100 |
commit | c897465aeefacaba3172dd136a386bd3ef2728f7 (patch) | |
tree | e23442b660b51630025044bc71f7f8e89877e280 /dw | |
parent | cf42b1f93f3db9e97724988f8929d5f735b037fb (diff) |
Another bug fix related to z-indices iteration.
Diffstat (limited to 'dw')
-rw-r--r-- | dw/stackingcontextmgr.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dw/stackingcontextmgr.cc b/dw/stackingcontextmgr.cc index ac025534..ef330852 100644 --- a/dw/stackingcontextmgr.cc +++ b/dw/stackingcontextmgr.cc @@ -58,15 +58,14 @@ void StackingContextMgr::addChildSCWidget (Widget *widget) int pos = findZIndex (widget->getStyle()->zIndex, true); DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos); if (pos == -1) { + pos = findZIndex (widget->getStyle()->zIndex, false); + DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos); + numZIndices++; + DBG_OBJ_SET_NUM ("numZIndices", numZIndices); zIndices = (int*)(zIndices ? realloc (zIndices, numZIndices * sizeof (int)) : malloc (numZIndices * sizeof (int))); - - DBG_OBJ_SET_NUM ("numZIndices", numZIndices); - - pos = findZIndex (widget->getStyle()->zIndex, false); - DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos); for (int i = numZIndices - 1; i >= pos + 1; i--) { zIndices[i] = zIndices[i - 1]; |