summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-08-16 17:28:19 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-10-17 20:38:16 +0200
commita4301a9954d4835a4b87344b9b037a816b17286d (patch)
tree8e25cf8c81b01dab931d869893c22fc5d30f6b8d
parent519f5c8ff05f6fdfc475e168c3f8facf10c6bb65 (diff)
Only use the viewport height with forceValue set
For cases where the available height is being computed and the CSS style has the height to auto, there available height is infinite. Don't return the viewport unless forceValue is set.
-rw-r--r--dw/widget.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/dw/widget.cc b/dw/widget.cc
index ce5286b9..d40eed97 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -723,7 +723,10 @@ int Widget::getAvailHeight (bool forceValue)
height = applyPerHeight (layout->viewportHeight, getStyle()->height);
} else {
DBG_OBJ_MSG ("resize", 1, "no specification");
- height = layout->viewportHeight;
+ if (forceValue)
+ height = layout->viewportHeight;
+ else
+ height = -1;
}
DBG_OBJ_MSG_END ();