smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Document what types are available where in SurfaceData

Open i509VCB opened this issue 2 years ago • 1 comments

It isn't clear what types can be accessed in SurfaceData. Do the SurfaceAttributes live in the data map, the multi cache?

Actually it's a RefCell<SurfaceAttributes> inside the multi cache.

What would be nice is to document in each module which adds stuff to the surface attributes what type it is (including a wrapping Mutex/RefCell) and whether it's in the data map or multi cache.

i509VCB avatar Mar 27 '23 02:03 i509VCB

I kinda stated this in https://github.com/Smithay/smithay/pull/709 would like to continue doing it this way. Type aliases mostly solve this problem, are self documenting, and give us a place where we can write docs related to surface data of certain module.

EDIT: If someone notices that I missed some surface data types, PRs/Issues are welcome.

PolyMeilex avatar Mar 27 '23 12:03 PolyMeilex