From 31d22d3083cef9d8dbc9f05e9ad58704a394f21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 17 Aug 2010 15:14:58 +0200 Subject: [PATCH] gtk/gtksocket.c: Use accessor functions to access GtkWindow --- gtk/gtksocket.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c index d561281430..879406153a 100644 --- a/gtk/gtksocket.c +++ b/gtk/gtksocket.c @@ -653,7 +653,7 @@ socket_update_focus_in (GtkSocket *socket) GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (socket)); if (gtk_widget_is_toplevel (toplevel) && - GTK_WINDOW (toplevel)->has_toplevel_focus && + gtk_window_has_toplevel_focus (GTK_WINDOW (toplevel)) && gtk_widget_is_focus (GTK_WIDGET (socket))) focus_in = TRUE; } @@ -676,7 +676,7 @@ socket_update_active (GtkSocket *socket) GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (socket)); if (gtk_widget_is_toplevel (toplevel) && - GTK_WINDOW (toplevel)->is_active) + gtk_window_is_active (GTK_WINDOW (toplevel))) active = TRUE; } @@ -997,6 +997,7 @@ _gtk_socket_advance_toplevel_focus (GtkSocket *socket, GtkWindow *window; GtkContainer *container; GtkWidget *child; + GtkWidget *focus_widget; GtkWidget *toplevel; GtkWidget *old_focus_child; GtkWidget *parent; @@ -1034,10 +1035,11 @@ _gtk_socket_advance_toplevel_focus (GtkSocket *socket, _gtk_socket_windowing_embed_set_focus_wrapped (); } - if (window->focus_widget) + focus_widget = gtk_window_get_focus (window); + if (window) { /* Wrapped off the end, clear the focus setting for the toplevel */ - parent = gtk_widget_get_parent (window->focus_widget); + parent = gtk_widget_get_parent (focus_widget); while (parent) { gtk_container_set_focus_child (GTK_CONTAINER (parent), NULL);