I was a bit torn when I started reviewing this (not sure if it's worth the trouble and extra coupling), but I think this may be useful for simple products based on Mir. I still don't think it's worth doing this if it's just to simplify USC.
95 + /// Called the first time each surface owned by the session posts its first buffer
We have always assumed one surface per system-compositor client, so it's not clear what's the correct behavior if such a client creates and posts to multiple surfaces. I guess the proposed approach of always focusing the "default" surface is OK for now, but perhaps in the future on_session_ready method should be extended to also provide the surface that became ready.
Looks good.
I was a bit torn when I started reviewing this (not sure if it's worth the trouble and extra coupling), but I think this may be useful for simple products based on Mir. I still don't think it's worth doing this if it's just to simplify USC.
95 + /// Called the first time each surface owned by the session posts its first buffer
We have always assumed one surface per system-compositor client, so it's not clear what's the correct behavior if such a client creates and posts to multiple surfaces. I guess the proposed approach of always focusing the "default" surface is OK for now, but perhaps in the future on_session_ready method should be extended to also provide the surface that became ready.