From: Christian Hergert Date: Thu, 3 Mar 2022 03:59:15 +0000 (-0800) Subject: macos: require input region to become key X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~3^2~7^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=60aceb984f58e044c21d6e4ca1afc7b13df30f08;p=gtk4.git macos: require input region to become key Some things cannot become key windows (like tooltips). We can use the input_region existence to determine if we should allow it as a key window. --- diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c index 3ed60cb049..836ded78e8 100644 --- a/gdk/macos/GdkMacosWindow.c +++ b/gdk/macos/GdkMacosWindow.c @@ -253,7 +253,8 @@ typedef NSString *CALayerContentsGravity; -(BOOL)canBecomeKeyWindow { - return GDK_IS_TOPLEVEL (gdk_surface) || GDK_IS_POPUP (gdk_surface); + return GDK_IS_TOPLEVEL (gdk_surface) || + (GDK_IS_POPUP (gdk_surface) && GDK_SURFACE (gdk_surface)->input_region != NULL); } -(void)showAndMakeKey:(BOOL)makeKey