vcl: Get Toolkit from SalInstance, not SystemEnvData
SystemEnvData holds data specific to a single frame/object, but the toolkit used is specific to the SalInstance/vcl plugin. Instead of having a SystemEnvData::toolkit member that needs to be set for each object, introduce a SalInstance::GetToolkit getter and a corresponding Application::GetToolkit that calls it. Change-Id: I052f122e991bec745af88d3f43847e4d77fb4ba4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201536 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <sal/log.hxx>
|
||||
#include <utility>
|
||||
#include <vcl/canvastools.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <vcl/syschild.hxx>
|
||||
#include <vcl/sysdata.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
@@ -459,9 +460,8 @@ namespace slideshow::internal
|
||||
if( mxPlayer.is() )
|
||||
{
|
||||
sal_IntPtr nParentWindowHandle(0);
|
||||
const SystemEnvData* pEnvData = mpMediaWindow->GetSystemData();
|
||||
// tdf#139609 gtk doesn't need the handle, and fetching it is undesirable
|
||||
if (!pEnvData || pEnvData->toolkit != SystemEnvData::Toolkit::Gtk)
|
||||
if (Application::GetToolkit() != Toolkit::Gtk)
|
||||
nParentWindowHandle = mpMediaWindow->GetParentWindowHandle();
|
||||
|
||||
aAWTRect.X = aAWTRect.Y = 0;
|
||||
|
||||
Reference in New Issue
Block a user