[vlc-commits] [Git][videolan/vlc][master] qt: delay requesting the interface window backdrop blur effect only on wayland
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Mar 10 14:53:46 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
d24015a2 by Fatih Uzunoglu at 2025-03-10T14:38:07+00:00
qt: delay requesting the interface window backdrop blur effect only on wayland
In b1e11641, we started to delay requesting the
blur effect for the interface window. This was
only because of Wayland, as without delaying the
blur effect could not be activated.
Even though this problem only occurred with
Wayland (I'm not sure if it is a KWin Wayland
thing, or a KWindowSystem Wayland thing), the
code for delaying requesting the blur effect
was not made conditional to simplify things as
it is generally fine to have the effect as soon
as the window gets activated.
With 874925c0, we disabled using redirection
surface on Windows when Direct Composition is
used. This makes the window completely transparent.
In early 2025, Chromium started doing the same [1].
However, they mention that it is better to have the
blur effect before the window is ready:
> Since the browser window appears before the GPU
> process is able to draw content into it, the
> acrylic effect gives the user feedback that a
> window is present and content is coming. Without
> the acrylic effect a transparent window will
> appear with a 1 pixel border that eats all mouse
> clicks; not a good user experience. Further,
> the acylic effect will appear in uncovered regions
> of the window when the user resizes the window.
Since we have the same "problem", I propose delaying
requesting the blur effect only when necessary, i.e.
on Wayland. I have previously checked that on X11 and
Windows this was working fine.
This also makes us aligned with the behavior of Chrome
browser, along with other applications that are going
to follow it.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/6143173
- - - - -
1 changed file:
- modules/gui/qt/maininterface/compositor.cpp
Changes:
=====================================
modules/gui/qt/maininterface/compositor.cpp
=====================================
@@ -278,13 +278,16 @@ bool CompositorVideo::commonGUICreateImpl(QWindow* window, CompositorVideo::Flag
m_mainCtx->setWindowSuportExtendedFrame(flags & CompositorVideo::HAS_EXTENDED_FRAME);
if (!backendIsOpenVg && (flags & CompositorVideo::HAS_ACRYLIC))
{
- if (Q_LIKELY(!window->isActive()))
+#ifndef _WIN32
+ assert(qGuiApp);
+ if (qGuiApp->platformName().startsWith(QLatin1String("wayland")) && Q_LIKELY(!window->isActive()))
{
connect(window, &QWindow::activeChanged, this, [this, window = QPointer(window)]() {
setBlurBehind(window, true);
}, Qt::SingleShotConnection);
}
else
+#endif
{
setBlurBehind(window, true);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d24015a21dd089ffd78bf6606be7c8e827e7a333
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d24015a21dd089ffd78bf6606be7c8e827e7a333
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