[gtk/wip/chergert/for-4-6: 39/56] macos: require input region to become key
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/for-4-6: 39/56] macos: require input region to become key
- Date: Wed, 16 Mar 2022 19:25:45 +0000 (UTC)
commit 60aceb984f58e044c21d6e4ca1afc7b13df30f08
Author: Christian Hergert <christian hergert me>
Date: Wed Mar 2 19:59:15 2022 -0800
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.
gdk/macos/GdkMacosWindow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]