summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-03-06 00:30:52 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-03-06 00:30:52 +0000
commit2096715583cc05db0961178454a7e22c8c987a78 (patch)
tree3c365e6be5b538c64b8190f3699a71a9097e769e
parent4b7c51552e07162bf54d54789542aec40a6fd870 (diff)
downloadgdk-pixbuf-2096715583cc05db0961178454a7e22c8c987a78.tar.gz
When setting the focus to NULL, clear the existing focus chain so that
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.)
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-07
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gtk/gtkwindow.c17
8 files changed, 65 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a0391167d..1cac638a6 100644
--- 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
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index a0391167d..1cac638a6 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -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
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index a0391167d..1cac638a6 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -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
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index a0391167d..1cac638a6 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -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
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index a0391167d..1cac638a6 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -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
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index a0391167d..1cac638a6 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -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
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index a0391167d..1cac638a6 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -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
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index fa8f0264d..20a29d870 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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