Fix deadlocks in wayland clipboard that can occur in special scenarios.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Thu, 12 May 2011 14:20:03 +0000 (16:20 +0200)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 13 May 2011 07:27:11 +0000 (09:27 +0200)
commit4e39ec1cd7aed754c9d6052c99438b77ab3678c8
tree72c7ec48f7da9273dad70b5f252bfa243afa2942
parent8cedc3b8b082c439709b649c5ffbe60f6365c04f
Fix deadlocks in wayland clipboard that can occur in special scenarios.

setMimeData() emits the changed signal always so to prevent duplicated
signals keyboardFocus() must only emit when the change came from
another wayland client. However direct connection may cause issues
when invoking the slot from a wayland callback, so use a metacall
to make sure we return from the callback. Unnecessary data transfer
and potential deadlock is now also avoided when a client is requesting
the mime data from itself.

Reviewed-by: Jørgen Lind
src/plugins/platforms/wayland/qwaylandclipboard.cpp
src/plugins/platforms/wayland/qwaylandclipboard.h