x11-toolkits/qt5-gui: add upstream fix to clipboard
Bug description from [2]:
QXcbConnection::getTimestamp() returns a timestamp from an
earlier PropertyNotify event which was already in the event
queue. I found this issue when I was trying to figure out why
gvim (with GTK+) exits with a BadWindow error when selecting or
copying a large text to the clipboard in a KDE environment. It
turns out that GTK+ uses the INCR protocol to send the data and
QT uses getTimestamp (in QXcbClipboard::clipboardReadProperty)
to set the start time of the transfer. Since that start time is
incorrect QT expects data which hasn't been sent yet and closes
the window. GTK+ still tries to add the data to the window which
causes a BadWindow error.
From [1]:
xcb: add a timeout control when reading INCR property
For the first call of QXcbClipboard::clipboardReadProperty()
inside of clipboardReadIncrementalProperty() in getSelection(),
it will get a XCB_NONE reply before the contents arrived via
property change. Then we give a chance to read more.
Upstream Code Review [1]:
https://codereview.qt-project.org/c/qt/qtbase/+/364040
Upstream Bug Report [2]:
https://bugreports.qt.io/browse/QTBUG-56595