[Interest] XCB clipboard freeze

Benjamin TERRIER b.terrier at gmail.com
Tue Nov 5 10:22:11 CET 2019


Le lun. 4 nov. 2019 à 23:53, Thiago Macieira <thiago.macieira at intel.com> a
écrit :

> On Monday, 4 November 2019 11:07:05 PST Benjamin TERRIER wrote:
> > Looking at QXcbClipboard code, the xcb event queue is blocked on a
> > QWaitCondition. To my knowledge a QWaitCondition will not unlock unless
> > wakeOne() or wakeAll() is called.
>
> Correct, but that is only used when there's another thread polling the XCB
> event queue. The problem is that the event doesn't get posted.
>

I am not sure I understand your point.

QXcbEventQueue is a QThread, so the xcb event queue is always pulled in its
own thread.
>From what I understand of the Qt XCB clipboard and event queue
implementation, accessing the clipboard from
the main Qt thread will always result in the QWaitCondition locking until
the queue thread receive a clipboard event or the timeout expires.
Also as the QWaitCondition does not care about the event dispatcher any
attempt to force event processing by waking up the event dispatcher
(either by registering file descriptors or calling wakeUp())  will not work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191105/c2ab1eb2/attachment.html>


More information about the Interest mailing list