mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-12-05 07:48:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3996bcf11e | ||
|
|
79131554c3 |
No files matched your search
@@ -2553,6 +2553,10 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
sudo sed -i 's/^Types: deb$/Types: deb\nArchitectures: amd64/' /etc/apt/sources.list.d/ubuntu.sources
|
||||
# Multi-Arch: same packages such as linux-libc-dev need one version for amd64 and riscv64.
|
||||
# The runner's Azure mirror can lag ports.ubuntu.com by hours, so take amd64 from the
|
||||
# archive that ports is published with.
|
||||
sudo sed -i 's|^URIs: .*|URIs: https://archive.ubuntu.com/ubuntu/|' /etc/apt/sources.list.d/ubuntu.sources
|
||||
sudo tee /etc/apt/sources.list.d/ports-riscv64.sources > /dev/null <<'EOF'
|
||||
Types: deb
|
||||
URIs: http://ports.ubuntu.com/ubuntu-ports
|
||||
@@ -2567,7 +2571,9 @@ jobs:
|
||||
sudo apt-get install -y --no-install-recommends gcc-riscv64-linux-gnu \
|
||||
g++-riscv64-linux-gnu clang libclang-dev lld cmake ninja-build meson pkg-config \
|
||||
make libssl-dev libsodium-dev qemu-user-static
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
# linux-libc-dev (amd64) is named so apt upgrades the runner's copy to the riscv64
|
||||
# version when new kernel headers came out after the runner image was built.
|
||||
sudo apt-get install -y --no-install-recommends linux-libc-dev \
|
||||
libc6-dev:riscv64 libgtk-3-dev:riscv64 libxcb-randr0-dev:riscv64 \
|
||||
libxcb-shape0-dev:riscv64 libxcb-xfixes0-dev:riscv64 libxdo-dev:riscv64 \
|
||||
libxfixes-dev:riscv64 libasound2-dev:riscv64 libpulse-dev:riscv64 libva-dev:riscv64 \
|
||||
|
||||
@@ -183,6 +183,15 @@ class _RecordingDialogState extends State<_RecordingDialog> {
|
||||
if (HardwareKeyboard.instance.isControlPressed) mods.add('primary');
|
||||
}
|
||||
|
||||
// Let plain Tab move focus to the dialog buttons.
|
||||
if (logical == LogicalKeyboardKey.tab &&
|
||||
mods.isEmpty &&
|
||||
!HardwareKeyboard.instance.isMetaPressed &&
|
||||
!HardwareKeyboard.instance.logicalKeysPressed
|
||||
.contains(LogicalKeyboardKey.altGraph)) {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
_mods = mods;
|
||||
if (!_isMac &&
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hbb/common/widgets/keyboard_shortcuts/recording_dialog.dart';
|
||||
import 'package:flutter_hbb/common/widgets/keyboard_shortcuts/shortcut_constants.dart';
|
||||
import 'package:flutter_hbb/generated_bridge.dart';
|
||||
import 'package:flutter_hbb/models/platform_model.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
class _Binding extends Fake implements RustdeskImpl {
|
||||
@override
|
||||
String translate(
|
||||
{required String name, required String locale, dynamic hint}) =>
|
||||
name;
|
||||
}
|
||||
|
||||
void main() {
|
||||
setUp(() => platformFFI.setBindingForTesting(_Binding()));
|
||||
|
||||
testWidgets('Tab reaches Save without replacing a recorded Ctrl+Tab',
|
||||
(tester) async {
|
||||
await tester.pumpWidget(const MaterialApp(home: Scaffold()));
|
||||
final result = showRecordingDialog(
|
||||
context: tester.element(find.byType(Scaffold)),
|
||||
actionId: kShortcutActionSwitchDisplayNext,
|
||||
actionLabel: 'Switch to next display',
|
||||
existingBindings: const [],
|
||||
actionLabelLookup: (action) => action,
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
await tester.sendKeyDownEvent(LogicalKeyboardKey.controlLeft);
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
||||
await tester.sendKeyUpEvent(LogicalKeyboardKey.controlLeft);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Ctrl+Tab'), findsOneWidget);
|
||||
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
||||
await tester.pump();
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.tab);
|
||||
await tester.pump();
|
||||
await tester.sendKeyEvent(LogicalKeyboardKey.enter);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(AlertDialog), findsNothing);
|
||||
expect((await result)?.binding, {
|
||||
'action': kShortcutActionSwitchDisplayNext,
|
||||
'mods': ['primary'],
|
||||
'key': 'tab',
|
||||
});
|
||||
}, variant: const TargetPlatformVariant({TargetPlatform.windows}));
|
||||
}
|
||||
Reference in new issue
Block a user