mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-18 18:31:02 +03:00
fix(flutter): preserve cursor minimum sizes and native hotspots
This commit is contained in:
@@ -16,8 +16,8 @@ deleteCustomCursor(String key) =>
|
||||
resetSystemCursor() {}
|
||||
|
||||
double _nativeHotspot(double hotspot, int bitmapSize) {
|
||||
if (!isLinux) return hotspot;
|
||||
// GDK takes integer hotspots inside the bitmap; avoid truncating toward zero.
|
||||
if (!isLinux && !isWindows) return hotspot;
|
||||
// GDK and Win32 take integer hotspots inside the bitmap; use the nearest pixel.
|
||||
return min(hotspot.round(), bitmapSize - 1).toDouble();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user