diff --git a/gtk/gtkimcontextquartz.c b/gtk/gtkimcontextquartz.c index 736f11dc2c..cd99e6aae8 100644 --- a/gtk/gtkimcontextquartz.c +++ b/gtk/gtkimcontextquartz.c @@ -273,8 +273,7 @@ quartz_set_client_surface (GtkIMContext *context, if (widget != NULL) { - GtkRoot *root = gtk_widget_get_root (widget); - GtkNative *native = gtk_widget_get_native (GTK_WIDGET (root)); + GtkNative *native = GTK_NATIVE (gtk_widget_get_root (widget)); if (native != NULL) qc->client_surface = gtk_native_get_surface (native);