[vlc-commits] [Git][videolan/vlc][master] qt: restore window backdrop blur effect in CompositorX11
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sun Jan 5 12:51:56 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
8ca8509b by Fatih Uzunoglu at 2025-01-05T12:31:31+00:00
qt: restore window backdrop blur effect in CompositorX11
CompositorX11, unlike others, requires explicit code to
adjust backdrop blur. When the effect gets activated at
a later time after initialization, it currently does not
have code to do the required adjustment.
This is a regression since b1e11641. I did not notice
it because I was using extended frame with CSD, where
this regression is masked.
- - - - -
5 changed files:
- modules/gui/qt/maininterface/compositor_x11.cpp
- modules/gui/qt/maininterface/compositor_x11_renderwindow.cpp
- modules/gui/qt/maininterface/compositor_x11_renderwindow.hpp
- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
Changes:
=====================================
modules/gui/qt/maininterface/compositor_x11.cpp
=====================================
@@ -196,6 +196,8 @@ bool CompositorX11::makeMainInterface(MainCtx* mainCtx)
setTransparentForMouseEvent(connection, m_videoWidget->winId());
m_videoWidget->show();
+ connect(m_mainCtx, &MainCtx::hasAcrylicSurfaceChanged, m_renderWindow.get(), &CompositorX11RenderWindow::setAcrylic);
+
m_qmlView = std::make_unique<CompositorX11UISurface>(m_renderWindow.get());
m_qmlView->setFlag(Qt::WindowType::WindowTransparentForInput);
=====================================
modules/gui/qt/maininterface/compositor_x11_renderwindow.cpp
=====================================
@@ -420,6 +420,7 @@ bool CompositorX11RenderWindow::startRendering()
connect(this, &CompositorX11RenderWindow::registerVideoWindow, m_renderTask, &RenderTask::onRegisterVideoWindow);
connect(this, &CompositorX11RenderWindow::videoSurfaceChanged, m_renderTask, &RenderTask::onVideoSurfaceChanged, Qt::BlockingQueuedConnection);
connect(this, &CompositorX11RenderWindow::hasExtendedFrameChanged, m_renderTask, &RenderTask::onExtendedFrameChanged, Qt::BlockingQueuedConnection);
+ connect(this, &CompositorX11RenderWindow::acrylicChanged, m_renderTask, &RenderTask::onAcrylicChanged);
//pass initial values
m_renderTask->onInterfaceSurfaceChanged(m_interfaceClient.get());
m_renderTask->onVideoSurfaceChanged(m_videoClient.get());
@@ -527,6 +528,16 @@ void CompositorX11RenderWindow::setVideoSize(const QSize& size)
}
}
+void CompositorX11RenderWindow::setAcrylic(bool value)
+{
+ if (m_hasAcrylic == value)
+ return;
+
+ m_hasAcrylic = value;
+
+ emit acrylicChanged(value);
+}
+
void CompositorX11RenderWindow::setVideoWindow( QWindow* window)
{
//ensure Qt x11 pending operation have been forwarded to the server
=====================================
modules/gui/qt/maininterface/compositor_x11_renderwindow.hpp
=====================================
@@ -167,6 +167,7 @@ public:
void setVideoSize(const QSize& size);
inline bool hasAcrylic() const { return m_hasAcrylic; }
+ void setAcrylic(bool value);
inline bool supportExtendedFrame() const { return m_supportExtendedFrame; }
void setVideoWindow(QWindow* window);
@@ -185,6 +186,7 @@ signals:
void visiblityChanged(bool visible);
void registerVideoWindow(unsigned int xid);
bool hasExtendedFrameChanged(bool hasExtendedFrame);
+ void acrylicChanged(bool value);
protected:
//override from QWindow
=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -541,7 +541,7 @@ void MainCtx::setHasAcrylicSurface(const bool v)
return;
m_hasAcrylicSurface = v;
- emit hasAcrylicSurfaceChanged();
+ emit hasAcrylicSurfaceChanged(v);
}
void MainCtx::incrementIntfUserScaleFactor(bool increment)
=====================================
modules/gui/qt/maininterface/mainctx.hpp
=====================================
@@ -482,7 +482,7 @@ signals:
void pinVideoControlsChanged();
void pinOpacityChanged();
- void hasAcrylicSurfaceChanged();
+ void hasAcrylicSurfaceChanged(bool);
void minimalViewChanged();
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8ca8509b30c7bcd0ddaecc6f62e2b7770d88bead
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8ca8509b30c7bcd0ddaecc6f62e2b7770d88bead
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list