]> Pileus Git - ~andy/gtk/commitdiff
When setting the focus to NULL, clear the existing focus chain so that
authorOwen Taylor <otaylor@redhat.com>
Wed, 6 Mar 2002 00:30:52 +0000 (00:30 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 6 Mar 2002 00:30:52 +0000 (00:30 +0000)
Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_set_focus): When setting
        the focus to NULL, clear the existing focus chain so
        that when we focus into the window again, we start
        at the beginning. (Pointed out by Tim Janik.)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkwindow.c

index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index a0391167dffb8499cea6ee4602fe9f4047199334..1cac638a6730bd7b35cdf133a5e80285294692fa 100644 (file)
@@ -1,3 +1,10 @@
+Tue Mar  5 19:19:19 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkwindow.c (gtk_window_set_focus): When setting
+       the focus to NULL, clear the existing focus chain so
+       that when we focus into the window again, we start
+       at the beginning. (Pointed out by Tim Janik.)
+
 2002-03-06  James Henstridge  <james@daa.com.au>
 
        * configure.in: libpango is now called libpango-1.0
index fa8f0264d51829f7eefb6ac70146606bcf3a0dc0..20a29d870e1c29c578c473cceb8961ad747d3692 100644 (file)
@@ -961,7 +961,22 @@ gtk_window_set_focus (GtkWindow *window,
   if (focus)
     gtk_widget_grab_focus (focus);
   else
-    _gtk_window_internal_set_focus (window, NULL);
+    {
+      /* Clear the existing focus chain, so that when we focus into
+       * the window again, we start at the beginnning.
+       */
+      GtkWidget *widget = window->focus_widget;
+      if (widget)
+       {
+         while (widget->parent)
+           {
+             widget = widget->parent;
+             gtk_container_set_focus_child (GTK_CONTAINER (widget), NULL);
+           }
+       }
+      
+      _gtk_window_internal_set_focus (window, NULL);
+    }
 }
 
 void