Module: wine Branch: master Commit: 3871981e3abf0d494e9c3811e2ff1d405535f95a URL: http://source.winehq.org/git/wine.git/?a=commit;h=3871981e3abf0d494e9c3811e2...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Jan 26 07:41:48 2017 +0300
dwrite: Invalidate layout on box changes.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dwrite/layout.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 7ef050e..a80c49e 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -2833,26 +2833,36 @@ static HRESULT WINAPI dwritetextlayout_GetLocaleName(IDWriteTextLayout3 *iface, static HRESULT WINAPI dwritetextlayout_SetMaxWidth(IDWriteTextLayout3 *iface, FLOAT maxWidth) { struct dwrite_textlayout *This = impl_from_IDWriteTextLayout3(iface); + BOOL changed;
TRACE("(%p)->(%.2f)\n", This, maxWidth);
if (maxWidth < 0.0f) return E_INVALIDARG;
+ changed = This->metrics.layoutWidth != maxWidth; This->metrics.layoutWidth = maxWidth; + + if (changed) + This->recompute |= RECOMPUTE_LINES; return S_OK; }
static HRESULT WINAPI dwritetextlayout_SetMaxHeight(IDWriteTextLayout3 *iface, FLOAT maxHeight) { struct dwrite_textlayout *This = impl_from_IDWriteTextLayout3(iface); + BOOL changed;
TRACE("(%p)->(%.2f)\n", This, maxHeight);
if (maxHeight < 0.0f) return E_INVALIDARG;
+ changed = This->metrics.layoutHeight != maxHeight; This->metrics.layoutHeight = maxHeight; + + if (changed) + This->recompute |= RECOMPUTE_LINES; return S_OK; }