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)
commit542ba35f2f0dfd265435f32ee79e498226989e6c
tree9ab7c9431de235ffb264997542752541936333ff
parentdd1a7a6379181765c3e8585f8fd12fb69f67c965
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