summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-07-12 14:50:33 +0200
committerSebastian Geerken <devnull@localhost>2014-07-12 14:50:33 +0200
commit6650105f9e365de1e45a0779e0300507e0e6dfda (patch)
tree01339fde23ce48e5b733376386f8a3dbb85715f7
parent04664dd9ec42a8d609852e7e4231d43f2ef87f9b (diff)
Fixed wrong assertion related to large toplevel image resources.
-rw-r--r--dw/layout.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index 8bd255c6..64f2f8d5 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -886,7 +886,10 @@ void Layout::resizeIdle ()
// called again.
resizeIdleId = -1;
- if (topLevel) {
+ // If this method is triggered by a viewport change, we can save
+ // time when the toplevel widget is not affected (as for a toplevel
+ // image resource).
+ if (topLevel && topLevel->needsResize ()) {
Requisition requisition;
Allocation allocation;
@@ -895,9 +898,11 @@ void Layout::resizeIdle ()
requisition.width, requisition.ascent, requisition.descent);
// This method is triggered by Widget::queueResize, which will,
- // in any case, set NEEDS_ALLOCATE (indirectly, as
- // ALLOCATE_QUEUED). This assertion helps to find
- // inconsistences.
+ // in any case, set NEEDS_ALLOCATE (indirectly, as ALLOCATE_QUEUED).
+ // This assertion helps to find inconsistences. (Cases where
+ // this method is triggered by a viewport change, but the
+ // toplevel widget is not affected, are filtered out some lines
+ // above: "if (topLevel && topLevel->needsResize ())".)
assert (topLevel->needsAllocate ());
allocation.x = allocation.y = 0;