summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-26 10:03:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-27 10:18:50 +0100
commitdf788fcc308bbf8950ad8a22a1f8290681b64f0d (patch)
treeeac883afe20faea112046e1ca4d3999c5668ef1c /slideshow
parent7d506f6bb45725bff9d5a6ddf0893d826f992596 (diff)
tdf#139609 avoid fetching unnecessary xid under gtk3
because of the side effects using a bare GtkGrid as m_pSocket in vcl/unx/gtk3/gtk3gtkobject.cxx is perhaps a poor choice, getting its xid causes poor side effects wrt events belonging to its child widgets getting delivered to the SalFrame widget, so duplicate scrolling after showing a opengl slide and/or showing a video and lots of flickering we're (generally at least) not using the xid under gtk3 so don't set it unless it's explicitly asked for. Happily the gtk Player::createPlayerWindow doesn't use its arg[0] xid in any case, so don't bother setting it for that backend. Change-Id: I1c59a607a332635091782c3b49de10647558f301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109941 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index 950dacc22184..fdcfde36aa8f 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -24,6 +24,7 @@
#include <sal/log.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/syschild.hxx>
+#include <vcl/sysdata.hxx>
#include <vcl/window.hxx>
#include <vcl/graph.hxx>
@@ -432,9 +433,13 @@ namespace slideshow::internal
if( mxPlayer.is() )
{
- aArgs[ 0 ] <<=
- sal::static_int_cast< sal_IntPtr >( mpMediaWindow->GetParentWindowHandle() );
+ 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::Gtk3)
+ nParentWindowHandle = mpMediaWindow->GetParentWindowHandle();
+ aArgs[ 0 ] <<= nParentWindowHandle;
aAWTRect.X = aAWTRect.Y = 0;
aArgs[ 1 ] <<= aAWTRect;
aArgs[ 2 ] <<= reinterpret_cast< sal_IntPtr >( mpMediaWindow.get() );