fix(desktop): reserve root Escape for leaving fullscreen instead of quitting
CI - Sanity Checks / Code Analysis (push) Successful in 5m36s
CI - Sanity Checks / Unit Tests (push) Failing after 13m36s
CI - Sanity Checks / Android JVM and Native Tests (push) Failing after 1m13s
CI - Sanity Checks / Native Formatting (push) Failing after 22s
CI - Sanity Checks / Linux native reliability (thread) (push) Failing after 2m59s
CI - Sanity Checks / Linux native reliability (address) (push) Failing after 2m57s
CI - Sanity Checks / Apple native reliability (iOS) (push) Canceled after 0s
CI - Sanity Checks / Apple native reliability (macOS) (push) Canceled after 0s
CI - Sanity Checks / Apple native reliability (tvOS) (push) Canceled after 0s
CI - Sanity Checks / Windows native reliability (arm64) (push) Canceled after 0s
CI - Sanity Checks / Windows native reliability (x64) (push) Canceled after 0s
CI - Sanity Checks / Dependency Validation (push) Successful in 1m9s
CI - Sanity Checks / Server checks (push) Successful in 28s
CI - Sanity Checks / Website checks (push) Successful in 1m22s
CI - Sanity Checks / Linux package smoke build (push) Failing after 6m41s
CI - Sanity Checks / Code Analysis (push) Successful in 5m36s
CI - Sanity Checks / Unit Tests (push) Failing after 13m36s
CI - Sanity Checks / Android JVM and Native Tests (push) Failing after 1m13s
CI - Sanity Checks / Native Formatting (push) Failing after 22s
CI - Sanity Checks / Linux native reliability (thread) (push) Failing after 2m59s
CI - Sanity Checks / Linux native reliability (address) (push) Failing after 2m57s
CI - Sanity Checks / Apple native reliability (iOS) (push) Canceled after 0s
CI - Sanity Checks / Apple native reliability (macOS) (push) Canceled after 0s
CI - Sanity Checks / Apple native reliability (tvOS) (push) Canceled after 0s
CI - Sanity Checks / Windows native reliability (arm64) (push) Canceled after 0s
CI - Sanity Checks / Windows native reliability (x64) (push) Canceled after 0s
CI - Sanity Checks / Dependency Validation (push) Successful in 1m9s
CI - Sanity Checks / Server checks (push) Successful in 28s
CI - Sanity Checks / Website checks (push) Successful in 1m22s
CI - Sanity Checks / Linux package smoke build (push) Failing after 6m41s
Physical-keyboard Escape at root Home now exits window fullscreen on Windows and Linux the way it already did on macOS, and never arms the press-back-again quit — so Escape aimed at fullscreen can't close the app. Remotes, gamepad B, and system back keep the double-press exit. close #1748
This commit is contained in:
@@ -95,16 +95,16 @@ void main() {
|
||||
expect(published, [true]);
|
||||
});
|
||||
|
||||
test('macOS physical Escape is reserved for native fullscreen only at root Home', () {
|
||||
test('desktop physical Escape is reserved for window fullscreen only at root Home', () {
|
||||
bool shouldHandle({
|
||||
bool isMacOS = true,
|
||||
bool isDesktop = true,
|
||||
bool isPhysicalKeyboardEvent = true,
|
||||
LogicalKeyboardKey logicalKey = LogicalKeyboardKey.escape,
|
||||
bool isCurrentRoute = true,
|
||||
bool isHomeTab = true,
|
||||
}) {
|
||||
return shouldHandleMacOsRootEscape(
|
||||
isMacOS: isMacOS,
|
||||
return shouldHandleDesktopRootEscape(
|
||||
isDesktop: isDesktop,
|
||||
isPhysicalKeyboardEvent: isPhysicalKeyboardEvent,
|
||||
logicalKey: logicalKey,
|
||||
isCurrentRoute: isCurrentRoute,
|
||||
@@ -115,8 +115,10 @@ void main() {
|
||||
expect(shouldHandle(), isTrue);
|
||||
expect(shouldHandle(isHomeTab: false), isFalse);
|
||||
expect(shouldHandle(isCurrentRoute: false), isFalse);
|
||||
// A remote/gamepad-synthesized escape is not a physical keyboard Escape;
|
||||
// it keeps the press-back-again exit path.
|
||||
expect(shouldHandle(isPhysicalKeyboardEvent: false), isFalse);
|
||||
expect(shouldHandle(isMacOS: false), isFalse);
|
||||
expect(shouldHandle(isDesktop: false), isFalse);
|
||||
expect(shouldHandle(logicalKey: LogicalKeyboardKey.gameButtonB), isFalse);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user