[vlc-commits] qt: bring back WA_PaintOnScreen for Win32
Steve Lhomme
git at videolan.org
Thu Apr 4 13:43:10 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 4 13:41:52 2019 +0200| [dd4d882892b9c946114db4ae3ad2faa89ddc7412] | committer: Steve Lhomme
qt: bring back WA_PaintOnScreen for Win32
The doc says this only affects X11 but digging in the code it seems that on
Windows if paintEngine() is overridden and returning NULL this flag should be
used. That's what we had so far.
This was removed by 08f886b6e88f46ebeb1cfb2bc838c6fec8c81dfc
Also use positif #if testing so it's more readable what case does what.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd4d882892b9c946114db4ae3ad2faa89ddc7412
---
modules/gui/qt/components/interface_widgets.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index 4a01118fed..8370d8b3f3 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -135,11 +135,15 @@ void VideoWidget::request( struct vout_window_t *p_wnd )
management */
/* This is currently disabled on X11 as it does not seem to improve
* performance, but causes the video widget to be transparent... */
-#if !defined (QT5_HAS_X11) && !defined(_WIN32)
+#if defined (QT5_HAS_X11)
+ stable->setMouseTracking( true );
+ setMouseTracking( true );
+#elif defined(_WIN32)
stable->setAttribute( Qt::WA_PaintOnScreen, true );
-#else
stable->setMouseTracking( true );
setMouseTracking( true );
+#else
+ stable->setAttribute( Qt::WA_PaintOnScreen, true );
#endif
layout->addWidget( stable );
More information about the vlc-commits
mailing list