winft / wrapland

Qt/C++ library wrapping libwayland
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Add destroy guards to all requests on wl_globals #74

Closed romangg closed 8 months ago

romangg commented 4 years ago

We can guard against asynchronous global destruction since 70161be4cdd2978dd2bd69aac39c6ac28688518d. We do this already for the Blur and Contrast Globals since 3eb7f44e09bca11075ac322dcb888762397fb2f9 because there was an explicit unit test that checked these classes and was disabled.

But with our system we can easily do this for every Global. In fact it is already done in the sense that binds are always allowed. But in case there are requests on the global interface we need to guard these too.

For that a small wrapper function exists: Global::cb. Global child classes need to wrap all their requests with this function.

romangg commented 3 years ago

mentioned in commit 6f4eeadc7a894df28e40a144bded9695d1c53783