Review Request 120471: Add Registry::sync() signal

Sebastian Kügler sebas at kde.org
Tue Oct 7 01:37:13 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120471/
-----------------------------------------------------------

(Updated Oct. 7, 2014, 1:37 a.m.)


Review request for kwin, Plasma and Martin Gräßlin.


Changes
-------

Add tests for Registry::sync signal

This tests two scenarios:
- Simply setting a Registry from wl_display, then initializing it, so it
  emits sync
- Using ConnectionThread, EventQueue, and all that in a different 
  QThread.

The latter test currently fails due to SocketNotifier apparently not 
being thread-safe. This also fails in other tests, and it works as soon
as I comment thread->moveToThread(ConnectionThread), it is unrelated. 
Note that in libkscreen, I don't have that issue so far, so it also
works in the threaded scenario, in principle.


Repository: kwayland


Description
-------

Add Registry::sync() signal

Emitted when the Wayland display is done flushing the initial interface
callbacks, announcing wl_display properties. This can be used to compress
events. Note that this signal is emitted only after announcing interfaces,
such as outputs, but not after receiving callbacks of interface properties,
such as the output's geometry, modes, etc..
This signal is emitted from the wl_display_sync callback.

For this, we add a wl_callback_listener to the registry's Private,
enqueue its events properly, if necessary, and trigger the signal
through a callback mechanism similar to the wl_registry callbacks.

This signal allows users of the API to find out when the signal
emissions, such as outputAnnounced, etc. for all currently existing
interfaces is complete.


Diffs (updated)
-----

  autotests/client/test_wayland_connection_thread.cpp a1ef989 
  src/client/registry.h 9e63a2b 
  src/client/registry.cpp 22f9484 

Diff: https://git.reviewboard.kde.org/r/120471/diff/


Testing
-------

tests in libkscreen exercise this feature, it works as expected, meaning I can notify when all initial synchronization is done.


Thanks,

Sebastian Kügler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20141007/3c061aa7/attachment.html>


More information about the Plasma-devel mailing list