projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dbd79f
)
macos: require input region to become key
author
Christian Hergert
<christian@hergert.me>
Thu, 3 Mar 2022 03:59:15 +0000
(19:59 -0800)
committer
Christian Hergert
<chergert@redhat.com>
Wed, 16 Mar 2022 19:25:10 +0000
(12:25 -0700)
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
patch
|
blob
|
history
diff --git
a/gdk/macos/GdkMacosWindow.c
b/gdk/macos/GdkMacosWindow.c
index 3ed60cb049f79359cc4750e4b5798e6e4ea3c83b..836ded78e8e42c6c2378e6f65b7ad8b65d9ce59b 100644
(file)
--- 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