]> git.lyx.org Git - features.git/commit
Clipboard: Retry on_dataChanged() after a delay on windows (#10109)
authorGuillaume Munch <gm@lyx.org>
Fri, 29 Apr 2016 20:51:39 +0000 (21:51 +0100)
committerGuillaume Munch <gm@lyx.org>
Wed, 4 May 2016 18:20:56 +0000 (19:20 +0100)
commit660a43ecf4c2a7440259fc6589bf3aaee86a9f32
tree5459ae18807b3ab27c073b4832d68fb93a22179a
parent8fd223146b02c83fbe78ff361590c9578a7d0454
Clipboard: Retry on_dataChanged() after a delay on windows (#10109)

An undocumented behaviour of QClipboard::mimeData() is that it can fail on
windows due to the specificities of the windows API that allow a race condition.
In particular it seems that querying the clipboard as soon as the dataChanged()
signal is received favourises this race condition.

Thanks to Trac user bquistorff for the explanation and a proof of concept patch.
src/frontends/qt4/GuiClipboard.cpp
src/frontends/qt4/GuiClipboard.h