[gtk+] gtk/gtkcontainer.c: Use accessor functions to access GtkWindow
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk/gtkcontainer.c: Use accessor functions to access GtkWindow
- Date: Mon, 23 Aug 2010 18:34:32 +0000 (UTC)
commit 595b27e22d2bea2b346b2695516b83fdb9fd9745
Author: Javier Jardón <jjardon gnome org>
Date: Tue Aug 17 15:07:51 2010 +0200
gtk/gtkcontainer.c: Use accessor functions to access GtkWindow
gtk/gtkcontainer.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index a1400d9..d50b419 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1956,15 +1956,16 @@ old_focus_coords (GtkContainer *container,
{
GtkWidget *widget = GTK_WIDGET (container);
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
+ GtkWidget *old_focus;
- if (GTK_IS_WINDOW (toplevel) && GTK_WINDOW (toplevel)->focus_widget)
+ if (GTK_IS_WINDOW (toplevel))
{
- GtkWidget *old_focus = GTK_WINDOW (toplevel)->focus_widget;
-
- return get_allocation_coords (container, old_focus, old_focus_rect);
+ old_focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
+ if (old_focus)
+ return get_allocation_coords (container, old_focus, old_focus_rect);
}
- else
- return FALSE;
+
+ return FALSE;
}
typedef struct _CompareInfo CompareInfo;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]