mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-19 13:30:02 +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
4d05fbe5e3
commit
86c8ad70f7
@ -250,8 +250,7 @@ typedef NSString *CALayerContentsGravity;
|
||||
|
||||
-(BOOL)canBecomeKeyWindow
|
||||
{
|
||||
return GDK_IS_TOPLEVEL (gdk_surface) ||
|
||||
(GDK_IS_POPUP (gdk_surface) && GDK_SURFACE (gdk_surface)->input_region != NULL);
|
||||
return GDK_IS_TOPLEVEL (gdk_surface);
|
||||
}
|
||||
|
||||
-(void)showAndMakeKey:(BOOL)makeKey
|
||||
|
@ -273,7 +273,8 @@ quartz_set_client_surface (GtkIMContext *context,
|
||||
|
||||
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)
|
||||
qc->client_surface = gtk_native_get_surface (native);
|
||||
|
Loading…
Reference in New Issue
Block a user