diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-09-26 11:04:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-09-27 11:32:21 +0200 |
commit | 322ea272bba63ba779120ca5ead4a4b40d1bb93f (patch) | |
tree | 15e7cd1a7f04b4a1ef28bbd41b31264b80ec64d0 /vcl/inc/headless/svpinst.hxx | |
parent | 694f8eb1f79ff28a45682c77d7bb88ad9197025b (diff) |
Fix some headless window sizes on Windows, to make `make check` more reliable
...by making it more resilient against varying screen sizes. On my 2560x1600
Windows laptop, three `make check` tests systematically failed, and apparently
all of them were caused by that larger-than-average screen (similar to what has
been detailed in the commit message of 3db6a93c558c55eed085b4386228f9951bb08936
"Compute a better GetDefaultCenterPos"):
* CppunitTest_sw_layoutwriter
> test/source/xmltesttools.cxx:191:testTdf134298::TestBody
> equality assertion failed
> - Expected: 2
> - Actual : 3
> - In <>, XPath '/root/page' number of nodes is incorrect
* CppunitTest_sw_ooxmlexport12
> sw/qa/extras/ooxmlexport/ooxmlexport12.cxx:526:testObjectCrossReference::TestBody
> equality assertion failed
> - Expected: Text 2
> - Actual : 2
* CppunitTest_sw_uiwriter2
> sw/qa/extras/uiwriter/uiwriter2.cxx:2702:testTdf122942::TestBody
> equality assertion failed
> - Expected: 2
> - Actual : 1
Those tests are all run with both SAL_USE_VCLPLUGIN=svp and --headless. But svp
is only present on Linux and is thus ignored on Windows. And --headless, while
preventing any windows from actually being shown, nevertheless uses the GUI code
to set up window sizes. So the idea here is to hack the Windows backend in
strategic places so that it uses "appropriate" window sizes in --headless mode
to make `make check` succeed.
The Linux svp backend has a single place in vcl/headless/svpframe.cxx where it
hardcodes the number of monitors to 1 and the screen size to 1024x768. However,
for the Windows backend, code determining and using those values is somewhat
spread, but it turned out that there is one strategic place in
ImplSalGetWorkArea that does what we want (without touching the reported number
of monitors at all), without (it appears) negatively affecting other scenarios.
(It appears that macOS, also not supporting an svp backend, is similarly
affected. But it looks harder there to come up with such a strategic place to
hardcode --headless window sizes, and at least my own macOS build's `make check`
is unaffected as I use a default scaled 1829x1080 screen resolution there
instead of the "raw" 3840x2160.)
Change-Id: I822241f81497b9f6bed8e9688eddbe7d798c6b34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140588
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/inc/headless/svpinst.hxx')
-rw-r--r-- | vcl/inc/headless/svpinst.hxx | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 874ce672d97a..e9aada5bc001 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -32,9 +32,6 @@ #include <sys/time.h> -#define VIRTUAL_DESKTOP_WIDTH 1024 -#define VIRTUAL_DESKTOP_HEIGHT 768 - #ifdef IOS #define SvpSalInstance AquaSalInstance #endif |