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

qtwayland caches clipboard content

    XMLWordPrintable

Details

    • Linux/Wayland
    • 19758eb40 (dev), 6bd5c70b8 (6.7), 18be006f4 (6.6), 49901affa (tqtc/lts-6.5), 9ce6a85f7 (tqtc/lts-6.2), 4f363a988 (tqtc/lts-5.15)

    Description

      Since GNOME 43, Nautilus is based on GTK4 and supports the FileTransfer portal. FileTransfer portal's IDs are valid only for one-time access and Nautilus gives a new FileTransfer ID on every request. So, if Qt application wants to check file content in QTextEdit::canInsertFromMimeData and then actually use the file in QTextEdit::insertFromMimeData, it has to access FileTransfer portal twice. With the xcb backend it works just fine: every mimeData->data("application/vnd.portal.filetransfer") request gives new transfer ID. With wayland backend, it gives the same ID when requesting in QTextEdit::canInsertFromMimeData and QTextEdit::insertFromMimeData what leads to "Invalid transfer" errors.

      I suspect this cache is the cause of this behavior difference: https://github.com/qt/qtwayland/blob/47ebd2ae5e40f5d1228edd3a35d0272dcf545585/src/client/qwaylanddataoffer.cpp#L120-L121

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              liaqi Liang Qi
              ilya-fedin Ilya Fedin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes