Skip to content

Commit

Permalink
Fuse.Nodes: do not use KeyboardBootstrapper with Fuse.Views
Browse files Browse the repository at this point in the history
For Fuse.Views, there's no global root-viewport that can handle
input for us, unlike for normal apps. This means that we're just
going to crash down these code-paths anyway.

Fixes #1177.
  • Loading branch information
kusma committed May 22, 2018
1 parent d3e9b2c commit edb47c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
## WrapPanel / WrapLayout
- Fixed `WrapPanel` to update its layout when a layout property changes.

## Fuse.Views
- Fixed a crash when pushing the back-button on Android.


# 1.8

Expand Down
7 changes: 5 additions & 2 deletions Source/Fuse.Nodes/MobileBootstrapping.uno
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ namespace Fuse
Fuse.Platform.Lifecycle.ExitedInteractive += OnExitInteractive;
Fuse.Platform.Lifecycle.Terminating += OnTerminating;

Uno.Platform.EventSources.HardwareKeys.KeyDown += KeyboardBootstrapper.OnKeyPressed;
Uno.Platform.EventSources.HardwareKeys.KeyUp += KeyboardBootstrapper.OnKeyReleased;
if defined(Mobile && !Library)
{
Uno.Platform.EventSources.HardwareKeys.KeyDown += KeyboardBootstrapper.OnKeyPressed;
Uno.Platform.EventSources.HardwareKeys.KeyUp += KeyboardBootstrapper.OnKeyReleased;
}
}

static void OnTerminating(Fuse.Platform.ApplicationState state)
Expand Down

0 comments on commit edb47c2

Please sign in to comment.