aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-08-18 18:55:54 +0200
committerSebastian Geerken <devnull@localhost>2013-08-18 18:55:54 +0200
commite6a0209f67f4a2de964caaec5554a85ecc09e0ed (patch)
treeeeb933223e67c49e83431bb39e3a58ca9ed45e7c
parenta5e77bdac14a79d6c8a09a6db8f1a2307b1537f3 (diff)
Some comments.
-rw-r--r--dw/widget.cc10
-rw-r--r--dw/widget.hh6
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,