diff --git a/lib/common/widgets/gesture/mouse_interactive_viewer.dart b/lib/common/widgets/gesture/mouse_interactive_viewer.dart index 80d80fa8c..dcf85a6a4 100644 --- a/lib/common/widgets/gesture/mouse_interactive_viewer.dart +++ b/lib/common/widgets/gesture/mouse_interactive_viewer.dart @@ -576,16 +576,16 @@ class _MouseInteractiveViewerState extends State final Offset global = event.position; if (_gestureIsSupported(_GestureType.scale)) { - late final shift = HardwareKeyboard.instance.isShiftPressed; if (HardwareKeyboard.instance.isControlPressed) { _handleMouseWheelScale(event, local, global); return; - } else if (shift || HardwareKeyboard.instance.isAltPressed) { + } + final shift = HardwareKeyboard.instance.isShiftPressed; + if (shift || HardwareKeyboard.instance.isAltPressed) { _handleMouseWheelPanAsScale(event, local, global, shift); return; - } else { - widget.pointerSignalFallback?.call(event); } + widget.pointerSignalFallback?.call(event); } widget.onInteractionUpdate?.call( ScaleUpdateDetails( diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp index 60608d0fe..e13aebdef 100644 --- a/windows/runner/win32_window.cpp +++ b/windows/runner/win32_window.cpp @@ -179,6 +179,12 @@ Win32Window::MessageHandler(HWND hwnd, WPARAM const wparam, LPARAM const lparam) noexcept { switch (message) { + case WM_SYSCOMMAND: + if (wparam == SC_KEYMENU && (lparam >> 16) <= 0) { + return 0; + } + break; + case WM_DESTROY: window_handle_ = nullptr; Destroy();