vcl/source/outdev/outdev.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 22023b104cd1e024aecc28a6161bea519a584407 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Jul 12 17:56:46 2016 +0200 vcl lok: fix missing paints due to zero-sized windows How to reproduce the problem: open an Impress presentation in gtktiledviewer, create two views. Start editing the text of a shape in one view -> nothing happens in the other view. There is no invalidation in the other view, as sdr::contact::ViewContact::AddViewObjectContact() is not called for either of the views. Editing with a single view only worked as when clicking into the shape, the ViewObjectContact is created. On the desktop, those ViewObjectContacts are created on the first paint of the slide, but in the LOK case the vcl::Window instances had a 0x0 size, so an invalidation didn't result in a paint -> no ViewObjectContact was created -> no LOK invalidation was sent. No testcase, as I didn't manage to write code that actually triggers the failure under cppunit with the fix reverted. Change-Id: If29fcea4258a45f3d6d9aab284445756609fa13c Reviewed-on: https://gerrit.libreoffice.org/27159 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 04d1210..eccf50d 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -21,6 +21,7 @@ #include <vcl/outdev.hxx> #include <vcl/unowrap.hxx> #include <vcl/sysdata.hxx> +#include <comphelper/lok.hxx> #include "salgdi.hxx" #include "svdata.hxx" @@ -65,6 +66,13 @@ OutputDevice::OutputDevice() : mnOutOffY = 0; mnOutWidth = 0; mnOutHeight = 0; + if (comphelper::LibreOfficeKit::isActive()) + { + // Device size isn't set later in this case, and with zero size, we + // miss paint events. + mnOutWidth = 1; + mnOutHeight = 1; + } mnDPIX = 0; mnDPIY = 0; mnDPIScaleFactor = 1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits