Merge pull request #1697 from Kingtous/master
fix: use rawRGBa cursor workaround on windows
This commit is contained in:
commit
171e516bd5
@ -404,7 +404,9 @@ class ImagePaint extends StatelessWidget {
|
|||||||
controller: _horizontal,
|
controller: _horizontal,
|
||||||
thumbVisibility: false,
|
thumbVisibility: false,
|
||||||
trackVisibility: false,
|
trackVisibility: false,
|
||||||
notificationPredicate: (notification) => notification.depth == 1,
|
notificationPredicate: layoutSize.height < size.height
|
||||||
|
? (notification) => notification.depth == 1
|
||||||
|
: defaultScrollNotificationPredicate,
|
||||||
child: widget,
|
child: widget,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
@ -848,7 +849,12 @@ class CursorModel with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateCacheLinux(ui.Image image, int id, int w, int h) async {
|
_updateCacheLinux(ui.Image image, int id, int w, int h) async {
|
||||||
final data = await image.toByteData(format: ui.ImageByteFormat.png);
|
ByteData? data;
|
||||||
|
if (Platform.isWindows) {
|
||||||
|
data = await image.toByteData(format: ui.ImageByteFormat.rawRgba);
|
||||||
|
} else {
|
||||||
|
data = await image.toByteData(format: ui.ImageByteFormat.png);
|
||||||
|
}
|
||||||
_cacheLinux = CursorData(
|
_cacheLinux = CursorData(
|
||||||
peerId: this.id,
|
peerId: this.id,
|
||||||
data: data?.buffer.asUint8List(),
|
data: data?.buffer.asUint8List(),
|
||||||
|
@ -73,7 +73,7 @@ dependencies:
|
|||||||
flutter_custom_cursor:
|
flutter_custom_cursor:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_flutter_custom_cursor
|
url: https://github.com/Kingtous/rustdesk_flutter_custom_cursor
|
||||||
ref: 4a950fd3a5a228bf5381070a4c803919d5787c07
|
ref: dec2166e881c47d922e1edc484d10d2cd5c2103b
|
||||||
window_size:
|
window_size:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/google/flutter-desktop-embedding.git
|
url: https://github.com/google/flutter-desktop-embedding.git
|
||||||
|
Loading…
x
Reference in New Issue
Block a user