diff --git a/libs/base/protos/message.proto b/libs/base/protos/message.proto index 31ca9c37d..668dfff06 100644 --- a/libs/base/protos/message.proto +++ b/libs/base/protos/message.proto @@ -859,7 +859,11 @@ message Misc { DisplayResolution change_display_resolution = 36; MessageQuery message_query = 37; int32 follow_current_display = 38; - // Since 1.5.0: send the CursorData of this id again, if the shape was sent. + // Since 1.5.0: send the CursorData of this id again. No controller sends this yet; it is + // here so a controller can one day bound its own shape store and ask for the shape the + // peer just selected. The peer answers with what it holds then: a shape its cache dropped + // is rebuilt, and held again, the next time it is shown, before any connection names it + // by id again, so the shape just selected is always there to give. uint64 request_cursor_data = 39; } } diff --git a/src/server/input_service.rs b/src/server/input_service.rs index cfdd8fa3c..d1831a44c 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -514,7 +514,10 @@ lazy_static::lazy_static! { lazy_static::lazy_static! { // Every shape the service has sent, by content id, for a controller that asks for one - // again. A shape under several handles is one message here, shared with `cached_cursor_data`. + // again. A shape under several handles is one message here, shared with `cached_cursor_data`, + // so this holds no more than that cache and is cleared with it. A shape dropped from both is + // rebuilt here the next time it is shown, in `run_cursor`, before any connection sends its + // `cursor_id`: whatever a controller has just been told to show, it can ask for. static ref CURSOR_SHAPES: Mutex>> = Default::default(); }