summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-14 18:37:04 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-14 17:44:26 +0000
commitac0b3b05ab52d0ac06137cf93d71187c7957ec99 (patch)
tree74a4918fc949bd60a67ab16cc159721829cfdc5d /vcl
parent4dd0d77675dd13c9de7c9ac5dbc0cb6b8ca53865 (diff)
vcl headless: ignore visibility in GetClientSize()
This fixes the missing-invalidation problem outlined in commit 22023b104cd1e024aecc28a6161bea519a584407 (vcl lok: fix missing paints due to zero-sized windows, 2016-07-12) also in Writer, not only in Impress. Starting text edit, doing a change, and ending text edit now results in the expected invalidations. Ignoring visibility seems to be a better fix for the missing paints. This way the headless case doesn't hit the corner cases of 0x0-sized windows. Also, the gtk vclplug's GetClientSize() only returns 0x0 in case the underlying window is disposed or it's minimized, but it does hand out the size before Show() is called, so now the headless backend is in sync with that. Change-Id: I78698cbfce954c8c593d279ab057a87cfbe87260 Reviewed-on: https://gerrit.libreoffice.org/27224 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpframe.cxx9
-rw-r--r--vcl/source/outdev/outdev.cxx7
2 files changed, 2 insertions, 14 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 7a6add25a1d1..7eac6b3a6740 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -285,13 +285,8 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
void SvpSalFrame::GetClientSize( long& rWidth, long& rHeight )
{
- if( m_bVisible )
- {
- rWidth = maGeometry.nWidth;
- rHeight = maGeometry.nHeight;
- }
- else
- rWidth = rHeight = 0;
+ rWidth = maGeometry.nWidth;
+ rHeight = maGeometry.nHeight;
}
void SvpSalFrame::GetWorkArea( Rectangle& rRect )
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index eccf50d5a504..2ea9988406c3 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -66,13 +66,6 @@ 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;