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.
This commit is contained in:
Christian Hergert 2022-03-02 19:59:15 -08:00
parent f3968f2f1e
commit 28607f082c

View File

@ -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