fix: moving a mouse no longer recomposes the whole session overlay (#1253)

This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-10-21 06:36:30 -04:00
1 parent 3eb0400df8
commit daeef1995f
2 files changed
+3 -2

No files matched your search

@@ -13,11 +13,12 @@ import androidx.compose.ui.graphics.drawscope.Stroke
@Composable
fun CursorOverlay(
position: Offset, visible: Boolean, scale: Float,
positionOf: () -> Offset, visible: Boolean, scale: Float,
image: ImageBitmap? = null, hotX: Int = 0, hotY: Int = 0, imageScale: Float = 1f,
) {
if (!visible) return
Canvas(modifier = Modifier.fillMaxSize()) {
val position = positionOf()
if (image != null) {
val w = (image.width * imageScale).toInt().coerceAtLeast(1)
val h = (image.height * imageScale).toInt().coerceAtLeast(1)