mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-05 23:41:27 +03:00
adjust cursor position for keyboard
This commit is contained in:
@@ -252,6 +252,13 @@ class CursorModel with ChangeNotifier {
|
||||
return Rect.fromLTWH(x0, y0, size.width / scale, size.height / scale);
|
||||
}
|
||||
|
||||
double adjustForKeyboard() {
|
||||
var keyboardHeight = MediaQueryData.fromWindow(ui.window).viewInsets.bottom;
|
||||
if (keyboardHeight < 100) return 0;
|
||||
var h = _y - getVisibleRect().top;
|
||||
return h > 200 ? h - 200 : 0;
|
||||
}
|
||||
|
||||
void updatePan(double dx, double dy) {
|
||||
final scale = FFI.canvasModel.scale;
|
||||
dx /= scale;
|
||||
|
||||
Reference in New Issue
Block a user