diff --git a/gdk/macos/GdkMacosWindow.c b/gdk/macos/GdkMacosWindow.c index a1a8aab99b..1b350303b2 100644 --- a/gdk/macos/GdkMacosWindow.c +++ b/gdk/macos/GdkMacosWindow.c @@ -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 diff --git a/gtk/gtkimcontextquartz.c b/gtk/gtkimcontextquartz.c index e0e068c3ee..dcbb64794c 100644 --- a/gtk/gtkimcontextquartz.c +++ b/gtk/gtkimcontextquartz.c @@ -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);