diff options
-rw-r--r-- | dw/widget.cc | 10 | ||||
-rw-r--r-- | dw/widget.hh | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/dw/widget.cc b/dw/widget.cc index f5bca367..e6c2cae0 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -231,6 +231,16 @@ void Widget::getExtremes (Extremes *extremes) */ void Widget::sizeAllocate (Allocation *allocation) { + /*printf ("The %stop-level %s %p is allocated:\n", + parent ? "non-" : "", getClassName(), this); + printf (" old = (%d, %d, %d + (%d + %d))\n", + this->allocation.x, this->allocation.y, this->allocation.width, + this->allocation.ascent, this->allocation.descent); + printf (" new = (%d, %d, %d + (%d + %d))\n", + allocation->x, allocation->y, allocation->width, allocation->ascent, + allocation->descent); + printf (" NEEDS_ALLOCATE = %s\n", needsAllocate () ? "true" : "false");*/ + if (needsAllocate () || allocation->x != this->allocation.x || allocation->y != this->allocation.y || diff --git a/dw/widget.hh b/dw/widget.hh index 18d74026..ab464c26 100644 --- a/dw/widget.hh +++ b/dw/widget.hh @@ -47,7 +47,11 @@ protected: /** * \brief Only used internally, set to enforce size allocation. * - * (I've forgotten the case, for which this is necessary.) + * In some cases, the size of a widget remains the same, but the + * children are allocated at different positions and in + * different sizes, so that a simple comparison of old and new + * allocation is insufficient. Therefore, this flag is set in + * queueResize. */ NEEDS_ALLOCATE = 1 << 3, |