mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-19 21:40:22 +00:00
macos: Only allow keyboard focus on toplevel windows
This avoids the focus to move to a popup or popover window. The red/yellow/green buttons remain colored.
This commit is contained in:
parent
3372b1a84b
commit
aca11d6879
@ -250,8 +250,7 @@ typedef NSString *CALayerContentsGravity;
|
|||||||
|
|
||||||
-(BOOL)canBecomeKeyWindow
|
-(BOOL)canBecomeKeyWindow
|
||||||
{
|
{
|
||||||
return GDK_IS_TOPLEVEL (gdk_surface) ||
|
return GDK_IS_TOPLEVEL (gdk_surface);
|
||||||
(GDK_IS_POPUP (gdk_surface) && GDK_SURFACE (gdk_surface)->input_region != NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)showAndMakeKey:(BOOL)makeKey
|
-(void)showAndMakeKey:(BOOL)makeKey
|
||||||
|
@ -273,7 +273,8 @@ quartz_set_client_surface (GtkIMContext *context,
|
|||||||
|
|
||||||
if (widget != NULL)
|
if (widget != NULL)
|
||||||
{
|
{
|
||||||
GtkNative *native = gtk_widget_get_native (widget);
|
GtkRoot *root = gtk_widget_get_root (widget);
|
||||||
|
GtkNative *native = gtk_widget_get_native (GTK_WIDGET (root));
|
||||||
|
|
||||||
if (native != NULL)
|
if (native != NULL)
|
||||||
qc->client_surface = gtk_native_get_surface (native);
|
qc->client_surface = gtk_native_get_surface (native);
|
||||||
|
Loading…
Reference in New Issue
Block a user