Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
54f953b3 by Fatih Uzunoglu at 2024-09-08T16:29:13+00:00
qml: let `grabToImage()` do the off-screen rendering in DragItem

Trying to use `grabToImage()` on an invisible item
reportedly caused issues, possibly due to lack of
polish call or children just not getting ready as
soon as they are made visible off-screen.

With Qt 6, this does not seem to apply anymore.
Instead of rendering off-screen manually, it should
be a better idea to just let `grabToImage()` do that
itself.

- - - - -


1 changed file:

- modules/gui/qt/widgets/qml/DragItem.qml


Changes:

=====================================
modules/gui/qt/widgets/qml/DragItem.qml
=====================================
@@ -132,10 +132,6 @@ Item {
 
     enabled: false
 
-    // Offscreen render:
-    layer.enabled: true
-    layer.effect: Item { }
-
     function _setData(data) {
         console.assert(data.length === indexes.length)
         _data = data
@@ -191,11 +187,7 @@ Item {
 
         const requestId = ++dragItem._grabImageRequest
 
-        visible = true
-
         const s = dragItem.grabToImage(function (result) {
-            visible = false
-
             if (requestId !== dragItem._grabImageRequest
                     || fsmDragInactive.active)
                 return



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/54f953b3a0d6e8194dbebe0c518c970520248e05

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/54f953b3a0d6e8194dbebe0c518c970520248e05
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to