diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-02-15 20:50:47 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-02-15 20:50:47 +0000 |
commit | 063bad00a2fb7cb4430c35a98ab83c8c1dc80569 (patch) | |
tree | 22bee36dcc3407988e448fe61a26c91ed2cc5f2f | |
parent | 3d23ab250e18153fcb39652aa35ac40745dc9509 (diff) | |
download | gdk-pixbuf-063bad00a2fb7cb4430c35a98ab83c8c1dc80569.tar.gz |
gtk/gtkwidget.c (gtk_widget_real_grab_focus):
Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_focus):
gtk/gtkwidget.c (gtk_widget_real_grab_focus):
If the focus widget is the same, but does not currently
have the focus, call gtk_window_set_focus(). This is needed
so that click focusing with GtkPlug works correctly.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 11 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 3 |
9 files changed, 75 insertions, 2 deletions
@@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index e8ad7db35..0087c0eaf 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e8ad7db35..0087c0eaf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e8ad7db35..0087c0eaf 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e8ad7db35..0087c0eaf 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e8ad7db35..0087c0eaf 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e8ad7db35..0087c0eaf 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Mon Feb 15 11:13:01 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkwindow.c (gtk_window_set_focus): + gtk/gtkwidget.c (gtk_widget_real_grab_focus): + + If the focus widget is the same, but does not currently + have the focus, call gtk_window_set_focus(). This is needed + so that click focusing with GtkPlug works correctly. + Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org> * configure.in (--enable-debug): default to yes for development trees. diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 09794e0d8..ef1954241 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3047,7 +3047,16 @@ gtk_widget_real_grab_focus (GtkWidget *focus_widget) widget = GTK_WINDOW (toplevel)->focus_widget; if (widget == focus_widget) - return; + { + /* We call gtk_window_set_focus() here so that the + * toplevel window can request the focus if necessary. + * This is needed when the toplevel is a GtkPlug + */ + if (!GTK_WIDGET_HAS_FOCUS (widget)) + gtk_window_set_focus (GTK_WINDOW (toplevel), focus_widget); + + return; + } if (widget) { diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 706783c29..d6edabca1 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -361,7 +361,8 @@ gtk_window_set_focus (GtkWindow *window, g_return_if_fail (GTK_WIDGET_CAN_FOCUS (focus)); } - if (window->focus_widget != focus) + if ((window->focus_widget != focus) || + (focus && !GTK_WIDGET_HAS_FOCUS (focus))) gtk_signal_emit (GTK_OBJECT (window), window_signals[SET_FOCUS], focus); } |