From c1b28008f47d92183d66ea3ac5bf05be507292b3 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Mon, 4 Nov 2024 14:49:35 -0500 Subject: [PATCH] fix(macOS): Prevent pointer over event originating from other window --- .../UnoNativeMac/UnoNativeMac/UNOWindow.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOWindow.m b/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOWindow.m index 2e67cc692bc7..7a72f4ebfdcc 100644 --- a/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOWindow.m +++ b/src/Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/UnoNativeMac/UNOWindow.m @@ -669,6 +669,11 @@ - (BOOL) getPositionFrom:(NSEvent*)event x:(CGFloat*)px y:(CGFloat *)py } - (void)sendEvent:(NSEvent *)event { + if (![[NSApplication sharedApplication] isActive]) { + [super sendEvent:event]; + return; + } + bool handled = false; MouseEvents mouse = MouseEventsNone; PointerDeviceType pdt = PointerDeviceTypeMouse;