aboutsummaryrefslogtreecommitdiff
path: root/dw/layout.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-08-23 13:08:09 +0200
committerSebastian Geerken <devnull@localhost>2013-08-23 13:08:09 +0200
commit98fbc8676a83f692eadcdd3c5037ecd77162ab85 (patch)
tree537a88426831bc5ecb3983cb3fef740418322af9 /dw/layout.cc
parent9e62ace70203fbb02a2443c06c7aecdec77aeb67 (diff)
Fixed an abortion in Layout::resizeIdle.
Diffstat (limited to 'dw/layout.cc')
-rw-r--r--dw/layout.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index 9e705055..4879bb1e 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -261,7 +261,11 @@ void Layout::addWidget (Widget *widget)
canvasHeightGreater = false;
setSizeHints ();
- queueResize ();
+
+ // Do not directly call Layout::queueResize(), but
+ // Widget::queueResize(), so that all flags are set properly,
+ // queueResizeList is filled, etc.
+ topLevel->queueResize (-1, false);
}
void Layout::removeWidget ()
@@ -1086,8 +1090,13 @@ void Layout::viewportSizeChanged (View *view, int width, int height)
/* if size changes, redraw this view.
* TODO: this is a resize call (redraw/resize code needs a review). */
- if (viewportWidth != width || viewportHeight != height)
- queueResize();
+ if (viewportWidth != width || viewportHeight != height) {
+ if (topLevel)
+ // similar to addWidget()
+ topLevel->queueResize (-1, false);
+ else
+ queueResize ();
+ }
viewportWidth = width;
viewportHeight = height;