summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r--gtk/gtkwindow.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 33218c718b..2664506c8d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2492,21 +2492,16 @@ void
gtk_window_set_focus (GtkWindow *window,
GtkWidget *focus)
{
- GtkWindowPrivate *priv;
+ GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
GtkWidget *parent;
g_return_if_fail (GTK_IS_WINDOW (window));
- priv = window->priv;
-
if (focus)
{
g_return_if_fail (GTK_IS_WIDGET (focus));
g_return_if_fail (gtk_widget_get_can_focus (focus));
- }
- if (focus)
- {
if (!gtk_widget_get_visible (GTK_WIDGET (window)))
priv->initial_focus = focus;
else