[vlc-commits] [Git][videolan/vlc][master] qml: do not repeatedly call `MainCtx::createWindowWithoutRedirectionSurface()`...
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Aug 3 02:23:16 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
25d8cfe6 by Fatih Uzunoglu at 2026-08-03T01:50:08+00:00
qml: do not repeatedly call `MainCtx::createWindowWithoutRedirectionSurface()` for the same window in `ToolTipExt`
This is supposed to be a one time adjustment (per window),
and not doing so also causes the debug message to be spammed.
Qt's `Popup.Window` option adjusts the parent of the QML
items, which in turn may cause `Window.window` to change
many times depending on popup visibility. This is also the
case even if the window is the same.
This also fixes incorrectly printing the item instead of the
window in the debug message.
- - - - -
1 changed file:
- modules/gui/qt/widgets/qml/ToolTipExt.qml
Changes:
=====================================
modules/gui/qt/widgets/qml/ToolTipExt.qml
=====================================
@@ -73,19 +73,25 @@ T.ToolTip {
}
contentItem: Text {
+ id: contentText
+
text: control.text
font: control.font
wrapMode: Text.WordWrap
color: theme.fg.primary
+ property QtWindow _lastWindowForNoRedirectionSurface
+
Component.onCompleted: {
if (MainCtx.createWindowWithoutRedirectionSurface) { // Win32
Window.windowChanged.connect(this, () => {
if (Window.window && (Window.window !== MainCtx.intfMainWindow)) { // Only relevant when `popupType` is `Popup.Window`
- const ret = MainCtx.createWindowWithoutRedirectionSurface(Window.window)
- if (!ret)
- console.debug("MainCtx::createWindowWithoutRedirectionSurface(): returned false for window", this)
+ if (Window.window !== contentText._lastWindowForNoRedirectionSurface) {
+ const ret = MainCtx.createWindowWithoutRedirectionSurface(Window.window)
+ console.debug("MainCtx::createWindowWithoutRedirectionSurface(): returned %1 for window %2.".arg(ret).arg(Window.window))
+ contentText._lastWindowForNoRedirectionSurface = Window.window
+ }
}
})
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/25d8cfe6d5db533b3dc8b11ee22a5569c7cc6220
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/25d8cfe6d5db533b3dc8b11ee22a5569c7cc6220
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list