forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
3d23ab250e
commit
063bad00a2
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -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>
|
Mon Feb 15 07:45:28 1999 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* configure.in (--enable-debug): default to yes for development trees.
|
* configure.in (--enable-debug): default to yes for development trees.
|
||||||
|
@ -3047,7 +3047,16 @@ gtk_widget_real_grab_focus (GtkWidget *focus_widget)
|
|||||||
widget = GTK_WINDOW (toplevel)->focus_widget;
|
widget = GTK_WINDOW (toplevel)->focus_widget;
|
||||||
|
|
||||||
if (widget == 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)
|
if (widget)
|
||||||
{
|
{
|
||||||
|
@ -361,7 +361,8 @@ gtk_window_set_focus (GtkWindow *window,
|
|||||||
g_return_if_fail (GTK_WIDGET_CAN_FOCUS (focus));
|
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);
|
gtk_signal_emit (GTK_OBJECT (window), window_signals[SET_FOCUS], focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user