Fix panning sounds after scrolling.

This commit is contained in:
Storm Dragon committed 2026-10-14 12:50:44 -04:00
1 parent b2f558c26c
commit 8e76d2341c
14 files changed
+338 -17

No files matched your search

+9 -5
View File
@@ -158,11 +158,7 @@ func snapshotFromNativeWithOptions(source *C.AtspiAccessible, text, caretCharact
snapshot.MinimumIncrement = float64(captured.minimumIncrement)
snapshot.ValueText = sanitizeSnapshotField(C.GoString(captured.valueText))
snapshot.TextBeforeCaret = sanitizeTextContext(C.GoString(captured.textBeforeCaret))
snapshot.SoundGeometry = SoundGeometry{
Object: Rectangle{X: int32(captured.objectX), Y: int32(captured.objectY), Width: int32(captured.objectWidth), Height: int32(captured.objectHeight)},
Reference: Rectangle{X: int32(captured.referenceX), Y: int32(captured.referenceY), Width: int32(captured.referenceWidth), Height: int32(captured.referenceHeight)},
ObjectKnown: captured.objectGeometryKnown != 0, ReferenceKnown: captured.referenceGeometryKnown != 0,
}
snapshot.SoundGeometry = soundGeometryFromNative(captured)
C.g_free(C.gpointer(captured.applicationName))
C.g_free(C.gpointer(captured.name))
C.g_free(C.gpointer(captured.role))
@@ -177,6 +173,14 @@ func snapshotFromNativeWithOptions(source *C.AtspiAccessible, text, caretCharact
return snapshot
}
func soundGeometryFromNative(captured C.cthulhu_snapshot) SoundGeometry {
return SoundGeometry{
Object: Rectangle{X: int32(captured.objectX), Y: int32(captured.objectY), Width: int32(captured.objectWidth), Height: int32(captured.objectHeight)},
Reference: Rectangle{X: int32(captured.referenceX), Y: int32(captured.referenceY), Width: int32(captured.referenceWidth), Height: int32(captured.referenceHeight)},
ObjectKnown: captured.objectGeometryKnown != 0, ReferenceKnown: captured.referenceGeometryKnown != 0,
}
}
func nativeObjectID(source *C.AtspiAccessible) ObjectID {
return NewObjectID(
C.GoString(C.cthulhu_accessible_bus_name(source)),