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/widget.cc | |
parent | a8620ad1a9236949c648c9747807c0b6ea2ef396 (diff) |
Fix SRDOP related bug in Widget::sizeRequest.
Diffstat (limited to 'dw/widget.cc')
-rw-r--r-- | dw/widget.cc | 26 |
1 files changed, 17 insertions, 9 deletions
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? */ |