aboutsummaryrefslogtreecommitdiff
path: root/dw/layout.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-11-14 19:54:37 +0100
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-11-14 19:54:37 +0100
commitc2629b5f08a874109ac0b22cb21ed0fc79bc6531 (patch)
tree6e6e4c5265a2b14a61d89b19410b2b9ecf9763e1 /dw/layout.cc
parentd26ad8f97c37987fc919a3c156538b3671a0ef1d (diff)
Only limit resizes on the top-level layout
Buttons also have their own Layout, which will try to resize every time the window has changed. We are only interested in the top-level layout, as is the one that has a problem on some pages.
Diffstat (limited to 'dw/layout.cc')
-rw-r--r--dw/layout.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index 4a5be74e..ed6f55db 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -255,7 +255,7 @@ Layout::Anchor::~Anchor ()
// ---------------------------------------------------------------------
-Layout::Layout (Platform *platform)
+Layout::Layout (Platform *platform, bool limit)
{
this->platform = platform;
view = NULL;
@@ -308,6 +308,7 @@ Layout::Layout (Platform *platform)
resizeIdleCounter = queueResizeCounter = sizeAllocateCounter
= sizeRequestCounter = getExtremesCounter = resizeCounter = 0;
+ resizeLimit = limit;
}
Layout::~Layout ()
@@ -882,7 +883,7 @@ void Layout::resizeIdle ()
/* Prevent infinite resize loop, if we reach this point it is very likely
* there is a bug in the layouting process */
- if (resizeCounter >= 1000) {
+ if (resizeLimit && resizeCounter >= 1000) {
MSG_ERR("Emergency layout stop after %d iterations\n", resizeCounter);
MSG_ERR("Please file a bug report with the complete console output\n");
resizeIdleId = -1;