Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98048

Drag and drop with pixmap laggy on KDE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.1
    • Fix Version/s: None
    • Component/s: GUI: Drag and Drop
    • Labels:
    • Environment:
      Arch Linux KDE Plasma 5.23.2, Qt 6.2.1, Compositor enabled, Morphing Popups Effect enabled
    • Platform/s:
      Linux/X11

      Description

      Drag and drop is very sluggish and laggy when attaching a Pixmap to the drag and when having the compositor enabled on KDE. This is because KDE animates the position of all tooltip windows, which means that KDE interpolates the position of the image, which causes very high latency.

      This is because Qt sets the Qt::ToolTip flag for QShapedPixmapWindow here: https://code.woboq.org/qt5/qtbase/src/gui/kernel/qshapedpixmapdndwindow.cpp.html#59

       setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::X11BypassWindowManagerHint | Qt::WindowTransparentForInput | Qt::WindowDoesNotAcceptFocus);
      

      In my opinion, it should not set the Qt::ToolTip flag, as this is not a tooltip, but a pixmap that follows the cursor across the whole desktop. Would it be a problem if that specific flag was removed?

       

      Related Qt forum post from 2016: https://forum.qt.io/topic/73975/qml-drag-drop-starts-late-lags-behind-and-is-sluggish

       

      The relevant source code of the KDE compositor animation can be found here: https://github.com/KDE/kwin/blob/master/src/effects/morphingpopups/package/contents/code/morphingpopups.js#L20

       

      The imageSource example right from the Qt docs is a minimal reproducable example to cause the high latency of the drag and drop image: https://doc-snapshots.qt.io/qt6-dev/qml-qtquick-drag.html#imageSource-attached-prop

        Attachments

        For Gerrit Dashboard: QTBUG-98048
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            vimpostor Magnus Groß
            Reporter:
            vimpostor Magnus Groß
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change