Kaydet (Commit) 161f7533 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#92982 vcl rendercontext: set buffer size in ImplHandleResize()

Instead of in PaintHelper::StartBufferedPaint(). If the buffer size is
set to match the size of a sub-widget (for which the paint was
triggered), then client using the buffer as a persistent vdev are unable
to paint at arbitrary locations.

For example, if we painted the ruler, then the blinking cursor won't be
able to paint to the SwEditWin area.

Change-Id: Iba07070baafb5b802fc6da200696611afd2010d7
üst 7cc7d578
......@@ -125,9 +125,6 @@ void PaintHelper::StartBufferedPaint()
// Remember what was the map mode of m_aPaintRect.
m_aPaintRectMapMode = m_pWindow->GetMapMode();
// update the output size now, after all the settings were copied
pFrameData->mpBuffer->SetOutputSize(m_pWindow->GetOutputSize());
// we need to remember the mnOutOffX / mnOutOffY, but actually really
// set it just temporarily for the subwidgets - so we are setting it here
// only to remember the value & to be able to pass it to the descendants
......
......@@ -35,6 +35,7 @@
#include <vcl/help.hxx>
#include <vcl/dockwin.hxx>
#include <vcl/menu.hxx>
#include <vcl/virdev.hxx>
#include <touch/touch.h>
#include <svdata.hxx>
......@@ -1714,6 +1715,12 @@ void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight )
}
else
pWindow->ImplGetWindowImpl()->mbCallResize = true;
if (pWindow->SupportsDoubleBuffering() && pWindow->ImplGetWindowImpl()->mbFrame)
{
// Propagate resize for the frame's buffer.
pWindow->ImplGetWindowImpl()->mpFrameData->mpBuffer->SetOutputSizePixel(pWindow->GetOutputSizePixel());
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment