forked from AuroraMiddleware/gtk
Various reentrancy fixes for widgets being destroyed out of
Thu Feb 12 21:58:20 2004 Owen Taylor <otaylor@redhat.com> Various reentrancy fixes for widgets being destroyed out of focus-out-event. (#128821, Grant Gayed) * gtk/gtkwindow.c (_gtk_window_unset_focus_and_default): Ref window and widget over callbacks. * gtk/gtkwidget.c (gtk_widget_hide) gtk/gtkwidget.c (gtk_widget_set_child_visible): Ref the widget before calling _gtk_window_unset_focus_and_default(), since that can call user callbacks. * gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows): Do nothing if the widget isn't realized.
This commit is contained in:
parent
e4d55e75e0
commit
3588aeb4af
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
Thu Feb 12 21:58:20 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Various reentrancy fixes for widgets being destroyed
|
||||
out of focus-out-event. (#128821, Grant Gayed)
|
||||
|
||||
* gtk/gtkwindow.c (_gtk_window_unset_focus_and_default):
|
||||
Ref window and widget over callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_hide)
|
||||
gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Ref the widget before calling _gtk_window_unset_focus_and_default(),
|
||||
since that can call user callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
|
||||
Do nothing if the widget isn't realized.
|
||||
|
||||
Fri Feb 13 01:31:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Feb 12 21:58:20 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Various reentrancy fixes for widgets being destroyed
|
||||
out of focus-out-event. (#128821, Grant Gayed)
|
||||
|
||||
* gtk/gtkwindow.c (_gtk_window_unset_focus_and_default):
|
||||
Ref window and widget over callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_hide)
|
||||
gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Ref the widget before calling _gtk_window_unset_focus_and_default(),
|
||||
since that can call user callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
|
||||
Do nothing if the widget isn't realized.
|
||||
|
||||
Fri Feb 13 01:31:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Feb 12 21:58:20 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Various reentrancy fixes for widgets being destroyed
|
||||
out of focus-out-event. (#128821, Grant Gayed)
|
||||
|
||||
* gtk/gtkwindow.c (_gtk_window_unset_focus_and_default):
|
||||
Ref window and widget over callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_hide)
|
||||
gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Ref the widget before calling _gtk_window_unset_focus_and_default(),
|
||||
since that can call user callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
|
||||
Do nothing if the widget isn't realized.
|
||||
|
||||
Fri Feb 13 01:31:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Feb 12 21:58:20 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Various reentrancy fixes for widgets being destroyed
|
||||
out of focus-out-event. (#128821, Grant Gayed)
|
||||
|
||||
* gtk/gtkwindow.c (_gtk_window_unset_focus_and_default):
|
||||
Ref window and widget over callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_hide)
|
||||
gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Ref the widget before calling _gtk_window_unset_focus_and_default(),
|
||||
since that can call user callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
|
||||
Do nothing if the widget isn't realized.
|
||||
|
||||
Fri Feb 13 01:31:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
|
||||
|
@ -1,3 +1,19 @@
|
||||
Thu Feb 12 21:58:20 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Various reentrancy fixes for widgets being destroyed
|
||||
out of focus-out-event. (#128821, Grant Gayed)
|
||||
|
||||
* gtk/gtkwindow.c (_gtk_window_unset_focus_and_default):
|
||||
Ref window and widget over callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_hide)
|
||||
gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Ref the widget before calling _gtk_window_unset_focus_and_default(),
|
||||
since that can call user callbacks.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
|
||||
Do nothing if the widget isn't realized.
|
||||
|
||||
Fri Feb 13 01:31:44 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
|
||||
|
@ -2040,10 +2040,11 @@ gtk_widget_hide (GtkWidget *widget)
|
||||
if (GTK_WIDGET_VISIBLE (widget))
|
||||
{
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
|
||||
|
||||
g_object_ref (widget);
|
||||
if (toplevel != widget && GTK_WIDGET_TOPLEVEL (toplevel))
|
||||
_gtk_window_unset_focus_and_default (GTK_WINDOW (toplevel), widget);
|
||||
|
||||
g_object_ref (widget);
|
||||
g_signal_emit (widget, widget_signals[HIDE], 0);
|
||||
if (!GTK_WIDGET_TOPLEVEL (widget))
|
||||
gtk_widget_queue_resize (widget);
|
||||
@ -2613,6 +2614,9 @@ static void
|
||||
gtk_widget_invalidate_widget_windows (GtkWidget *widget,
|
||||
GdkRegion *region)
|
||||
{
|
||||
if (!GTK_WIDGET_REALIZED (widget))
|
||||
return;
|
||||
|
||||
if (!GTK_WIDGET_NO_WINDOW (widget) && widget->parent)
|
||||
{
|
||||
int x, y;
|
||||
@ -5114,6 +5118,8 @@ gtk_widget_set_child_visible (GtkWidget *widget,
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (!GTK_WIDGET_TOPLEVEL (widget));
|
||||
|
||||
g_object_ref (widget);
|
||||
|
||||
if (is_visible)
|
||||
GTK_PRIVATE_SET_FLAG (widget, GTK_CHILD_VISIBLE);
|
||||
else
|
||||
@ -5136,6 +5142,8 @@ gtk_widget_set_child_visible (GtkWidget *widget,
|
||||
else
|
||||
gtk_widget_unmap (widget);
|
||||
}
|
||||
|
||||
g_object_unref (widget);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4562,6 +4562,9 @@ _gtk_window_unset_focus_and_default (GtkWindow *window,
|
||||
|
||||
{
|
||||
GtkWidget *child;
|
||||
|
||||
g_object_ref (window);
|
||||
g_object_ref (widget);
|
||||
|
||||
if (GTK_CONTAINER (widget->parent)->focus_child == widget)
|
||||
{
|
||||
@ -4581,6 +4584,9 @@ _gtk_window_unset_focus_and_default (GtkWindow *window,
|
||||
|
||||
if (child == widget)
|
||||
gtk_window_set_default (window, NULL);
|
||||
|
||||
g_object_unref (widget);
|
||||
g_object_unref (window);
|
||||
}
|
||||
|
||||
/*********************************
|
||||
|
Loading…
Reference in New Issue
Block a user