From db77204a52cb4449f7a7c9e3c3ac9cd806098b5e Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 18 Feb 2022 03:39:00 -0800 Subject: [PATCH] macos: improve event filtering for foreign panels We might have panels with controls in them where the window is running in another process. The control could have a wrapper window which we would see from this process. This can happen with the GtkFileChooserNative, but any NSSavePanel in macOS 10.15+ is out of process (not just sandboxed applications). --- gdk/macos/gdkmacosdisplay-translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c index e62a157e50..8e3cd90b82 100644 --- a/gdk/macos/gdkmacosdisplay-translate.c +++ b/gdk/macos/gdkmacosdisplay-translate.c @@ -857,9 +857,9 @@ get_surface_from_ns_event (GdkMacosDisplay *self, find_under_pointer: - if (!surface) + if (surface == NULL && nswindow == NULL) { - /* Fallback used when no NSSurface set. This happens e.g. when + /* Fallback used when no NSWindow set. This happens e.g. when * we allow motion events without a window set in gdk_event_translate() * that occur immediately after the main menu bar was clicked/used. * This fallback will not return coordinates contained in a window's -- 2.30.2