diff options
-rw-r--r-- | include/vcl/settings.hxx | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/macosx.mk | 3 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 7 |
4 files changed, 18 insertions, 2 deletions
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 0a6c6e937188..021161f90324 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -588,6 +588,7 @@ public: bool GetDisablePrinting() const; void SetEnableLocalizedDecimalSep( bool bEnable ); bool GetEnableLocalizedDecimalSep() const; + bool GetPseudoHeadless() const; bool operator ==( const MiscSettings& rSet ) const; bool operator !=( const MiscSettings& rSet ) const; diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 8d6f8341ce01..a40e054f00ab 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -17,6 +17,9 @@ # the License at http://www.apache.org/licenses/LICENSE-2.0 . # +# to avoid flashing windows during tests +export VCL_HIDE_WINDOWS=1 + gb_SDKDIR := $(MACOSX_SDK_PATH) include $(GBUILDDIR)/platform/com_GCC_defs.mk diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 1e6050ce1ae0..d93ffe98de32 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -213,6 +213,7 @@ struct ImplMiscData TriState mnEnableATT; bool mbEnableLocalizedDecimalSep; TriState mnDisablePrinting; + bool mbPseudoHeadless; }; struct ImplHelpData @@ -2345,6 +2346,8 @@ ImplMiscData::ImplMiscData() mnDisablePrinting = TRISTATE_INDET; static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI mbEnableLocalizedDecimalSep = (pEnv != NULL); + pEnv = getenv("VCL_HIDE_WINDOWS"); // do not display any windows + mbPseudoHeadless = (pEnv != NULL); } ImplMiscData::ImplMiscData( const ImplMiscData& rData ) @@ -2352,6 +2355,7 @@ ImplMiscData::ImplMiscData( const ImplMiscData& rData ) mnEnableATT = rData.mnEnableATT; mnDisablePrinting = rData.mnDisablePrinting; mbEnableLocalizedDecimalSep = rData.mbEnableLocalizedDecimalSep; + mbPseudoHeadless = rData.mbPseudoHeadless; } MiscSettings::MiscSettings() @@ -2539,6 +2543,11 @@ bool MiscSettings::GetEnableLocalizedDecimalSep() const return mpData->mbEnableLocalizedDecimalSep; } +bool MiscSettings::GetPseudoHeadless() const +{ + return mpData->mbPseudoHeadless; +} + ImplHelpData::ImplHelpData() { mnTipDelay = 500; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 396b66ef778f..7fb93e28dd12 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2414,8 +2414,11 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) mpWindowImpl->mbSuppressAccessibilityEvents = false; mpWindowImpl->mbPaintFrame = true; - bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? true : false; - mpWindowImpl->mpFrame->Show( true, bNoActivate ); + if (!Application::GetSettings().GetMiscSettings().GetPseudoHeadless()) + { + bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? true : false; + mpWindowImpl->mpFrame->Show( true, bNoActivate ); + } if( aDogTag.IsDead() ) return; |