diff options
author | Sebastian Geerken <devnull@localhost> | 2016-05-29 12:02:21 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2016-05-29 12:02:21 +0200 |
commit | 7669e862eb1634f271be86c1b895aad14df5327c (patch) | |
tree | 213dd40a54e63333f51d02e273511b55b623ad36 /dw | |
parent | a8620ad1a9236949c648c9747807c0b6ea2ef396 (diff) |
Fix SRDOP related bug in Widget::sizeRequest.
Diffstat (limited to 'dw')
-rw-r--r-- | dw/tools.cc | 5 | ||||
-rw-r--r-- | dw/widget.cc | 26 |
2 files changed, 22 insertions, 9 deletions
diff --git a/dw/tools.cc b/dw/tools.cc index 547c2585..7579691c 100644 --- a/dw/tools.cc +++ b/dw/tools.cc @@ -172,6 +172,11 @@ bool SizeParams::isEquivalent (SizeParams *other) for (int i = 0; result && i < numPos; i++) { bool otherFound = false; for (int j = 0; !otherFound && j < numPos; j++) { + DBG_OBJ_MSGF ("resize", 1, + "#%d = (%p, %d, %d) vs. #%d = (%p, %d, %d)", + i, references[i], x[i], y[i], j, other->references[j], + other->x[j], other->y[j]); + if (references[i] == other->references[j]) { otherFound = true; if (!(x[i] == other->x[j] && y[i] == other->y[j])) diff --git a/dw/widget.cc b/dw/widget.cc index abd84340..42a134ef 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -528,6 +528,14 @@ void Widget::sizeRequest (Requisition *requisition, int numPos, DBG_OBJ_ENTER ("resize", 0, "sizeRequest", "%d, ...", numPos); + DBG_IF_RTFL { + DBG_OBJ_MSG_START(); + for(int i = 0; i < numPos; i++) + DBG_OBJ_MSGF ("resize", 1, "ref #%d: %p, %d, %d", + i, references[i], x[i], y[i]); + DBG_OBJ_MSG_END(); + } + enterSizeRequest (); if (resizeQueued ()) { @@ -539,6 +547,9 @@ void Widget::sizeRequest (Requisition *requisition, int numPos, // Layout::resizeIdle. } + SizeParams newRequisitionParams (numPos, references, x, y); + DBG_OBJ_ASSOC_CHILD (&newRequisitionParams); + bool callImpl; if (needsResize ()) callImpl = true; @@ -546,16 +557,13 @@ void Widget::sizeRequest (Requisition *requisition, int numPos, // Even if RESIZE_QUEUED / NEEDS_RESIZE is not set, calling // sizeRequestImpl is necessary when the relavive positions passed here // have changed. - SizeParams newParams (numPos, references, x, y); - DBG_OBJ_ASSOC_CHILD (&newParams); - if (newParams.isEquivalent (&requisitionParams)) - callImpl = false; - else { - callImpl = true; - requisitionParams = newParams; - } + callImpl = !newRequisitionParams.isEquivalent (&requisitionParams); } - + + DBG_OBJ_MSGF ("resize", 1, "callImpl = %s", boolToStr (callImpl)); + + requisitionParams = newRequisitionParams; + if (callImpl) { calcExtraSpace (numPos, references, x, y); /** \todo Check requisition == &(this->requisition) and do what? */ |