[gtk/wip/chergert/macos-fix-popup-input] macos: fix keyboard input on popovers




commit 853ef43dae8049ff09a808fddc9e55fd8153f44c
Author: Christian Hergert <christian hergert me>
Date:   Wed Feb 16 17:52:42 2022 -0800

    macos: fix keyboard input on popovers
    
    GdkPopup can also become the "key" window (just not the "main" window).

 gdk/macos/GdkMacosWindow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c
index 8dda79ab4d..a30d1b71a1 100644
--- a/gdk/macos/GdkMacosWindow.c
+++ b/gdk/macos/GdkMacosWindow.c
@@ -310,7 +310,7 @@ typedef NSString *CALayerContentsGravity;
 
 -(BOOL)canBecomeKeyWindow
 {
-  return GDK_IS_TOPLEVEL (gdk_surface);
+  return GDK_IS_TOPLEVEL (gdk_surface) || GDK_IS_POPUP (gdk_surface);
 }
 
 -(void)showAndMakeKey:(BOOL)makeKey


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]