[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/inc vcl/source vcl/unx
Aleksei Nikiforov (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 23 10:39:44 UTC 2021
vcl/inc/salframe.hxx | 4 +++-
vcl/source/app/svdata.cxx | 2 +-
vcl/source/window/window.cxx | 7 +++++++
vcl/unx/generic/window/salframe.cxx | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
New commits:
commit d1e194baabc7d67a510cb363aa764b10e60881d2
Author: Aleksei Nikiforov <darktemplar at basealt.ru>
AuthorDate: Mon Sep 20 11:25:45 2021 +0300
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Sep 23 12:39:09 2021 +0200
tdf#144624 Prevent infinite recursion when loading SVG icon
When Generic/X11 VCL backend plugin loads SVG icon,
it creates virtual device for rasterizing an SVG icon,
which in turn tries to load an SVG icon,
and thus infinite recursion happens.
Change-Id: I7559b6255e6718e64ef4a6e7c79d597375e5823a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122344
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 9b4478e62c712ef0f75c4a001e260dfdd6b3ca4c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122518
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 6525ab14b1c9..ac8840b437c7 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -80,6 +80,8 @@ enum class SalFrameStyleFlags
INTRO = 0x00000100,
// partial fullscreen: fullscreen on one monitor of a multimonitor display
PARTIAL_FULLSCREEN = 0x00800000,
+ // tdf#144624: don't set icon
+ NOICON = 0x01000000,
// system child window inside another SalFrame
SYSTEMCHILD = 0x08000000,
// plugged system child window
@@ -91,7 +93,7 @@ enum class SalFrameStyleFlags
};
namespace o3tl {
- template<> struct typed_flags<SalFrameStyleFlags> : is_typed_flags<SalFrameStyleFlags, 0x788001ff> {};
+ template<> struct typed_flags<SalFrameStyleFlags> : is_typed_flags<SalFrameStyleFlags, 0x798001ff> {};
};
// Extended frame style (sal equivalent to extended WinBits)
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index ba5fce26278a..1d1375b24d7b 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -232,7 +232,7 @@ vcl::Window *ImplGetDefaultContextWindow()
{
SAL_INFO( "vcl", "ImplGetDefaultWindow(): No AppWindow" );
- pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create( nullptr, WB_DEFAULTWIN );
+ pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create(nullptr, WB_DEFAULTWIN);
pSVData->mpDefaultWin->SetText( "VCL ImplGetDefaultWindow" );
}
catch (const css::uno::Exception&)
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e08e31763566..ae9df74d8faa 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1032,6 +1032,13 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
break;
}
+ // tdf#144624 for the DefaultWindow, which is never visible, don't
+ // create an icon for it so construction of a DefaultWindow cannot
+ // trigger creation of a VirtualDevice which itself requires a
+ // DefaultWindow to exist
+ if( nStyle & WB_DEFAULTWIN )
+ nFrameStyle |= SalFrameStyleFlags::NOICON;
+
SalFrame* pParentFrame = nullptr;
if ( pParent )
pParentFrame = pParent->mpWindowImpl->mpFrame;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 6e1c392706a9..5195dbde4103 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -561,7 +561,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
if( IsOverrideRedirect() )
Attributes.override_redirect = True;
// default icon
- if( !(nStyle_ & SalFrameStyleFlags::INTRO) )
+ if( !(nStyle_ & SalFrameStyleFlags::INTRO) && !(nStyle_ & SalFrameStyleFlags::NOICON))
{
bool bOk=false;
try
More information about the Libreoffice-commits
mailing list