Skip to content

Commit

Permalink
Merge branch 'rustdesk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbo8418 authored Nov 8, 2024
2 parents 95abf3a + d3efcd4 commit 6143a3e
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.07.12
VCPKG_COMMIT_ID: "1de2026f28ead93ff1773e6e680387643e914ea1"
VERSION: "1.3.2"
VERSION: "1.3.3"
NDK_VERSION: "r27b"
#signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# vcpkg version: 2024.06.15
VCPKG_COMMIT_ID: "f7423ee180c4b7f40d43402c2feb3859161ef625"
VERSION: "1.3.2"
VERSION: "1.3.3"
NDK_VERSION: "r26d"
#signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustdesk"
version = "1.3.2"
version = "1.3.3"
authors = ["rustdesk <[email protected]>"]
edition = "2021"
build= "build.rs"
Expand Down
2 changes: 1 addition & 1 deletion appimage/AppImageBuilder-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AppDir:
id: rustdesk
name: rustdesk
icon: rustdesk
version: 1.3.2
version: 1.3.3
exec: usr/lib/rustdesk/rustdesk
exec_args: $@
apt:
Expand Down
2 changes: 1 addition & 1 deletion appimage/AppImageBuilder-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AppDir:
id: rustdesk
name: rustdesk
icon: rustdesk
version: 1.3.2
version: 1.3.3
exec: usr/lib/rustdesk/rustdesk
exec_args: $@
apt:
Expand Down
9 changes: 8 additions & 1 deletion flutter/lib/mobile/pages/remote_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {

@override
void didChangeMetrics() {
// If the soft keyboard is visible and the canvas has been changed(panned or scaled)
// Don't try reset the view style and focus the cursor.
if (gFFI.cursorModel.lastKeyboardIsVisible &&
gFFI.canvasModel.isMobileCanvasChanged) {
return;
}

final newBottom = MediaQueryData.fromView(ui.window).viewInsets.bottom;
_timerDidChangeMetrics?.cancel();
_timerDidChangeMetrics = Timer(Duration(milliseconds: 100), () async {
Expand Down Expand Up @@ -563,7 +570,7 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
// `onChanged` may be called depending on the input method if this widget is wrapped in
// `Focus(onKeyEvent: ..., child: ...)`
// For `Backspace` button in the soft keyboard:
// en/fr input method:
// en/fr input method:
// 1. The button will not trigger `onKeyEvent` if the text field is not empty.
// 2. The button will trigger `onKeyEvent` if the text field is empty.
// ko/zh/ja input method: the button will trigger `onKeyEvent`
Expand Down
16 changes: 16 additions & 0 deletions flutter/lib/models/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,10 @@ class CanvasModel with ChangeNotifier {

Timer? _timerMobileFocusCanvasCursor;

// `isMobileCanvasChanged` is used to avoid canvas reset when changing the input method
// after showing the soft keyboard.
bool isMobileCanvasChanged = false;

final ScrollController _horizontal = ScrollController();
final ScrollController _vertical = ScrollController();

Expand Down Expand Up @@ -1639,6 +1643,9 @@ class CanvasModel with ChangeNotifier {

panX(double dx) {
_x += dx;
if (isMobile) {
isMobileCanvasChanged = true;
}
notifyListeners();
}

Expand All @@ -1653,6 +1660,9 @@ class CanvasModel with ChangeNotifier {

panY(double dy) {
_y += dy;
if (isMobile) {
isMobileCanvasChanged = true;
}
notifyListeners();
}

Expand All @@ -1672,6 +1682,9 @@ class CanvasModel with ChangeNotifier {
// (focalPoint.dy - _y_1 - adjust) / s1 + displayOriginY = (focalPoint.dy - _y_2 - adjust) / s2 + displayOriginY
// _y_2 = focalPoint.dy - adjust - (focalPoint.dy - _y_1 - adjust) / s1 * s2
_y = focalPoint.dy - adjust - (focalPoint.dy - _y - adjust) / s * _scale;
if (isMobile) {
isMobileCanvasChanged = true;
}
notifyListeners();
}

Expand Down Expand Up @@ -1941,6 +1954,8 @@ class CursorModel with ChangeNotifier {
bool _lastIsBlocked = false;
bool _lastKeyboardIsVisible = false;

bool get lastKeyboardIsVisible => _lastKeyboardIsVisible;

Rect? get keyHelpToolsRectToAdjustCanvas =>
_lastKeyboardIsVisible ? _keyHelpToolsRect : null;
keyHelpToolsVisibilityChanged(Rect? r, bool keyboardIsVisible) {
Expand All @@ -1955,6 +1970,7 @@ class CursorModel with ChangeNotifier {
}
if (isMobile && _lastKeyboardIsVisible != keyboardIsVisible) {
parent.target?.canvasModel.mobileFocusCanvasCursor();
parent.target?.canvasModel.isMobileCanvasChanged = false;
}
_lastKeyboardIsVisible = keyboardIsVisible;
}
Expand Down
4 changes: 2 additions & 2 deletions flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1583,8 +1583,8 @@ packages:
dependency: "direct main"
description:
path: "plugins/window_size"
ref: a738913c8ce2c9f47515382d40827e794a334274
resolved-ref: a738913c8ce2c9f47515382d40827e794a334274
ref: eb3964990cf19629c89ff8cb4a37640c7b3d5601
resolved-ref: eb3964990cf19629c89ff8cb4a37640c7b3d5601
url: "https://github.com/google/flutter-desktop-embedding.git"
source: git
version: "0.1.0"
Expand Down
4 changes: 2 additions & 2 deletions flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# 1.1.9-1 works for android, but for ios it becomes 1.1.91, need to set it to 1.1.9-a.1 for iOS, will get 1.1.9.1, but iOS store not allow 4 numbers
version: 1.3.2+51
version: 1.3.3+52

environment:
sdk: '^3.1.0'
Expand Down Expand Up @@ -62,7 +62,7 @@ dependencies:
git:
url: https://github.com/google/flutter-desktop-embedding.git
path: plugins/window_size
ref: a738913c8ce2c9f47515382d40827e794a334274
ref: eb3964990cf19629c89ff8cb4a37640c7b3d5601
get: ^4.6.5
visibility_detector: ^0.4.0+2
contextmenu: ^3.0.0
Expand Down
2 changes: 1 addition & 1 deletion libs/portable/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustdesk-portable-packer"
version = "1.3.2"
version = "1.3.3"
edition = "2021"
description = "RustDesk Remote Desktop"

Expand Down
2 changes: 1 addition & 1 deletion res/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pkgname=rustdesk
pkgver=1.3.2
pkgver=1.3.3
pkgrel=0
epoch=
pkgdesc=""
Expand Down
2 changes: 1 addition & 1 deletion res/rpm-flutter-suse.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: rustdesk
Version: 1.3.2
Version: 1.3.3
Release: 0
Summary: RPM package
License: GPL-3.0
Expand Down
2 changes: 1 addition & 1 deletion res/rpm-flutter.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: rustdesk
Version: 1.3.2
Version: 1.3.3
Release: 0
Summary: RPM package
License: GPL-3.0
Expand Down
2 changes: 1 addition & 1 deletion res/rpm.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: rustdesk
Version: 1.3.2
Version: 1.3.3
Release: 0
Summary: RPM package
License: GPL-3.0
Expand Down

0 comments on commit 6143a3e

Please sign in to comment.