summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-02-08 14:25:30 +0100
committerTimm Bäder <mail@baedert.org>2017-03-31 09:50:39 +0200
commit1affd425a190541a74cffc67e796b153ae126bf5 (patch)
tree6e5389841914ba3ca52cff284eaa6777abba0563
parentcc05fc574c44f8446a07efc86d832cfb5e3773e3 (diff)
downloadgtk+-1affd425a190541a74cffc67e796b153ae126bf5.tar.gz
window: Simplify _set_focus
-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