diff options
-rw-r--r-- | dw/layout.cc | 87 | ||||
-rw-r--r-- | dw/outofflowmgr.cc | 6 |
2 files changed, 47 insertions, 46 deletions
diff --git a/dw/layout.cc b/dw/layout.cc index 209decc8..521f4f76 100644 --- a/dw/layout.cc +++ b/dw/layout.cc @@ -656,53 +656,52 @@ void Layout::resizeIdle () //static int calls = 0; //MSG(" Layout::resizeIdle calls = %d\n", ++calls); - while (resizeIdleId != -1) { - // Reset already here, since in this function, queueResize() may be - // called again. - resizeIdleId = -1; - - if (topLevel) { - Requisition requisition; - Allocation allocation; - - topLevel->sizeRequest (&requisition); - - allocation.x = allocation.y = 0; - allocation.width = requisition.width; - allocation.ascent = requisition.ascent; - allocation.descent = requisition.descent; - topLevel->sizeAllocate (&allocation); - - canvasWidth = requisition.width; - canvasAscent = requisition.ascent; - canvasDescent = requisition.descent; - - emitter.emitCanvasSizeChanged ( - canvasWidth, canvasAscent, canvasDescent); - - // Tell the view about the new world size. - view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent); - // view->queueDrawTotal (false); - - if (usesViewport) { - int currHThickness = currHScrollbarThickness(); - int currVThickness = currVScrollbarThickness(); - - if (!canvasHeightGreater && - canvasAscent + canvasDescent - > viewportHeight - currHThickness) { - canvasHeightGreater = true; - setSizeHints (); - /* May queue a new resize. */ - } + assert (resizeIdleId != -1); - // Set viewport sizes. - view->setViewportSize (viewportWidth, viewportHeight, - currHThickness, currVThickness); - } + // Reset already here, since in this function, queueResize() may be + // called again. + resizeIdleId = -1; + + if (topLevel) { + Requisition requisition; + Allocation allocation; + + topLevel->sizeRequest (&requisition); + + allocation.x = allocation.y = 0; + allocation.width = requisition.width; + allocation.ascent = requisition.ascent; + allocation.descent = requisition.descent; + topLevel->sizeAllocate (&allocation); + + canvasWidth = requisition.width; + canvasAscent = requisition.ascent; + canvasDescent = requisition.descent; + + emitter.emitCanvasSizeChanged (canvasWidth, canvasAscent, canvasDescent); + + // Tell the view about the new world size. + view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent); + // view->queueDrawTotal (false); + + if (usesViewport) { + int currHThickness = currHScrollbarThickness(); + int currVThickness = currVScrollbarThickness(); + + if (!canvasHeightGreater && + canvasAscent + canvasDescent + > viewportHeight - currHThickness) { + canvasHeightGreater = true; + setSizeHints (); + /* May queue a new resize. */ + } + + // Set viewport sizes. + view->setViewportSize (viewportWidth, viewportHeight, + currHThickness, currVThickness); } - // views are redrawn via Widget::resizeDrawImpl () + // views are redrawn via Widget::resizeDrawImpl () } diff --git a/dw/outofflowmgr.cc b/dw/outofflowmgr.cc index 75457cb7..2f966d59 100644 --- a/dw/outofflowmgr.cc +++ b/dw/outofflowmgr.cc @@ -621,7 +621,8 @@ void OutOfFlowMgr::drawAbsolutelyPositioned (View *view, Rectangle *area) bool OutOfFlowMgr::isWidgetOutOfFlow (core::Widget *widget) { // May be extended for fixed (and relative?) positions. - return isWidgetFloat (widget) || isWidgetAbsolutelyPositioned (widget); + return isWidgetFloat (widget); + // TODO temporary disabled: || isWidgetAbsolutelyPositioned (widget); } void OutOfFlowMgr::addWidgetInFlow (Textblock *textblock, @@ -782,7 +783,8 @@ void OutOfFlowMgr::markSizeChange (int ref) } else if (isRefAbsolutelyPositioned (ref)) { int i = getAbsolutelyPositionedIndexFromRef (ref); absolutelyPositioned->get(i)->dirty = true; - } + } else + assertNotReached(); } |