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

Martin Gräßlin mgraesslin at kde.org
Mon Oct 13 09:23:53 UTC 2014



> On Oct. 8, 2014, 9:46 a.m., Martin Gräßlin wrote:
> > src/client/registry.cpp, line 119
> > <https://git.reviewboard.kde.org/r/120471/diff/4/?file=316845#file316845line119>
> >
> >     this would crash - please use a test case for it. The destroy is intended to be used to clean up cleanly in case the Wayland connection died. So calling into any wayland client library call would crash. There should be a test for destroy handling, please extend that one.

I just added a WaylandPointer (see http://commits.kde.org/kwayland/e213c4717ffba42952753540e27200a93d814cf4 ) which makes the whole process much easier. Declare your wl_callback as:
WaylandPointer<wl_callback, wl_callback_destroy> callback;

and then just do in ::release():
d->callback.release();
and in ::destroy():
d->callback.destroy();


- Martin


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


On Oct. 7, 2014, 11:12 a.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120471/
> -----------------------------------------------------------
> 
> (Updated Oct. 7, 2014, 11:12 a.m.)
> 
> 
> Review request for kwin, Plasma and Martin Gräßlin.
> 
> 
> 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
> -----
> 
>   autotests/client/test_wayland_registry.cpp 571be0f 
>   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/20141013/476b9606/attachment.html>


More information about the Plasma-devel mailing list