summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/headless/svpframe.cxx1
-rw-r--r--vcl/inc/headless/svpinst.hxx3
-rw-r--r--vcl/inc/salsys.hxx3
-rw-r--r--vcl/win/window/salframe.cxx7
4 files changed, 11 insertions, 3 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 23a7e2595bda..5c6a713572d2 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -27,6 +27,7 @@
#ifndef IOS
#include <headless/svpgdi.hxx>
#endif
+#include <salsys.hxx>
#include <basegfx/vector/b2ivector.hxx>
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
diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx
index dff65b2f35cd..265380a1de2e 100644
--- a/vcl/inc/salsys.hxx
+++ b/vcl/inc/salsys.hxx
@@ -82,6 +82,9 @@ public:
VCL_DLLPUBLIC SalSystem* ImplGetSalSystem();
+#define VIRTUAL_DESKTOP_WIDTH 1024
+#define VIRTUAL_DESKTOP_HEIGHT 768
+
#endif // INCLUDED_VCL_INC_SALSYS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 9880613e7fa3..95cb08e20b07 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -174,6 +174,13 @@ void WinSalFrame::UpdateFrameState()
// if pParentRect is set, the workarea of the monitor that contains pParentRect is returned
void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect )
{
+ if (Application::IsHeadlessModeEnabled()) {
+ pRect->left = 0;
+ pRect->top = 0;
+ pRect->right = VIRTUAL_DESKTOP_WIDTH;
+ pRect->bottom = VIRTUAL_DESKTOP_HEIGHT;
+ return;
+ }
// check if we or our parent is fullscreen, then the taskbar should be ignored
bool bIgnoreTaskbar = false;
WinSalFrame* pFrame = GetWindowPtr( hWnd );