summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2020-10-12 20:11:35 -0700
committerChristian Hergert <chergert@redhat.com>2020-10-14 11:34:44 -0700
commitd6abc125adf99b8edc7e6aacaaff0739fdf45ec1 (patch)
tree99495d45ace5b063d573ae59b3229cfb2a8805b6
parent974ce500d65dd993bed3fc9248c695ccc2120856 (diff)
downloadgtk+-d6abc125adf99b8edc7e6aacaaff0739fdf45ec1.tar.gz
macos: fix compiler warnings
-rw-r--r--gtk/gtkfilechoosernativequartz.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkfilechoosernativequartz.c b/gtk/gtkfilechoosernativequartz.c
index 671e0acc3d..57ae3907f6 100644
--- a/gtk/gtkfilechoosernativequartz.c
+++ b/gtk/gtkfilechoosernativequartz.c
@@ -517,8 +517,12 @@ gtk_file_chooser_native_quartz_show (GtkFileChooserNative *self)
transient_for = gtk_native_dialog_get_transient_for (GTK_NATIVE_DIALOG (self));
if (transient_for)
{
+ GtkNative *native = GTK_NATIVE (transient_for);
+ GdkSurface *surface = gtk_native_get_surface (native);
+ NSWindow *window = _gdk_macos_surface_get_native (GDK_MACOS_SURFACE (surface));
+
gtk_widget_realize (GTK_WIDGET (transient_for));
- data->parent = _gdk_macos_surface_get_native (gtk_native_get_surface (GTK_NATIVE (transient_for)));
+ data->parent = window;
if (gtk_native_dialog_get_modal (GTK_NATIVE_DIALOG (self)))
data->modal = TRUE;