Align painted cursors with Linux texture origins

Use the truncated Linux texture origin while preserving fractional cursor positions and hotspots. Compare painted cursor geometry with the actual video widget in the existing regression tests.
This commit is contained in:
fufesou
2026-09-13 10:04:12 +08:00
parent 32e9895294
commit bbc8ee3bdb
2 changed files with 39 additions and 9 deletions

View File

@@ -1469,7 +1469,10 @@ class CursorPaint extends StatelessWidget {
final ffi = canvas.parent.target!;
final peer = ffi.ffiModel;
if (ffi.imageModel.useTextureRender || peer.pi.forceTextureRender) {
return null;
// Match Linux's texture origin without rounding the cursor or hotspot.
return isLinux
? Offset(canvas.x.toInt().toDouble(), canvas.y.toInt().toDouble())
: null;
}
var scale = canvas.scale;
final displays = peer.pi.getCurDisplays();