Removed code for drawing the child in two places at once. Unfortunately,
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed code for drawing the child in two places at once. Unfortunately, not only does it not work anymore (because reparenting has been fixed), but it also triggers reparent/expose loops in some cases. * gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed an unecessary unrealize.
This commit is contained in:
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
|
||||
code for drawing the child in two places at once. Unfortunately,
|
||||
not only does it not work anymore (because reparenting has
|
||||
been fixed), but it also triggers reparent/expose loops
|
||||
in some cases.
|
||||
|
||||
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
|
||||
an unecessary unrealize.
|
||||
|
||||
Fri Jun 12 21:18:56 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_reparent): Update the
|
||||
old and new parents' child window lists properly.
|
||||
|
||||
Fri Jun 12 09:24:47 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkpacker.h:
|
||||
|
||||
@ -816,6 +816,7 @@ gdk_window_reparent (GdkWindow *window,
|
||||
{
|
||||
GdkWindowPrivate *window_private;
|
||||
GdkWindowPrivate *parent_private;
|
||||
GdkWindowPrivate *old_parent_private;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
@ -823,6 +824,7 @@ gdk_window_reparent (GdkWindow *window,
|
||||
new_parent = (GdkWindow*) &gdk_root_parent;
|
||||
|
||||
window_private = (GdkWindowPrivate*) window;
|
||||
old_parent_private = (GdkWindowPrivate*)window_private->parent;
|
||||
parent_private = (GdkWindowPrivate*) new_parent;
|
||||
|
||||
if (!window_private->destroyed && !parent_private->destroyed)
|
||||
@ -830,6 +832,10 @@ gdk_window_reparent (GdkWindow *window,
|
||||
window_private->xwindow,
|
||||
parent_private->xwindow,
|
||||
x, y);
|
||||
|
||||
old_parent_private->children = g_list_remove (old_parent_private->children, window);
|
||||
parent_private->children = g_list_prepend (parent_private->children, window);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -816,6 +816,7 @@ gdk_window_reparent (GdkWindow *window,
|
||||
{
|
||||
GdkWindowPrivate *window_private;
|
||||
GdkWindowPrivate *parent_private;
|
||||
GdkWindowPrivate *old_parent_private;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
@ -823,6 +824,7 @@ gdk_window_reparent (GdkWindow *window,
|
||||
new_parent = (GdkWindow*) &gdk_root_parent;
|
||||
|
||||
window_private = (GdkWindowPrivate*) window;
|
||||
old_parent_private = (GdkWindowPrivate*)window_private->parent;
|
||||
parent_private = (GdkWindowPrivate*) new_parent;
|
||||
|
||||
if (!window_private->destroyed && !parent_private->destroyed)
|
||||
@ -830,6 +832,10 @@ gdk_window_reparent (GdkWindow *window,
|
||||
window_private->xwindow,
|
||||
parent_private->xwindow,
|
||||
x, y);
|
||||
|
||||
old_parent_private->children = g_list_remove (old_parent_private->children, window);
|
||||
parent_private->children = g_list_prepend (parent_private->children, window);
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -379,6 +379,18 @@ gtk_option_menu_expose (GtkWidget *widget,
|
||||
{
|
||||
gtk_option_menu_paint (widget, &event->area);
|
||||
|
||||
|
||||
/* The following code tries to draw the child in two places at
|
||||
* once. It fails miserably for several reasons
|
||||
*
|
||||
* - If the child is not no-window, removing generates
|
||||
* more expose events. Bad, bad, bad.
|
||||
*
|
||||
* - Even if the child is no-window, removing it now (properly)
|
||||
* clears the space where it was, so it does no good
|
||||
*/
|
||||
|
||||
#if 0
|
||||
remove_child = FALSE;
|
||||
child = GTK_BUTTON (widget)->child;
|
||||
|
||||
@ -401,6 +413,14 @@ gtk_option_menu_expose (GtkWidget *widget,
|
||||
|
||||
if (remove_child)
|
||||
gtk_option_menu_remove_contents (GTK_OPTION_MENU (widget));
|
||||
#else
|
||||
child = GTK_BUTTON (widget)->child;
|
||||
child_event = *event;
|
||||
if (child && GTK_WIDGET_NO_WINDOW (child) &&
|
||||
gtk_widget_intersect (child, &event->area, &child_event.area))
|
||||
gtk_widget_event (child, (GdkEvent*) &child_event);
|
||||
|
||||
#endif /* 0 */
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@ -491,7 +511,6 @@ gtk_option_menu_remove_contents (GtkOptionMenu *option_menu)
|
||||
if (GTK_WIDGET (option_menu->menu_item)->state != GTK_BUTTON (option_menu)->child->state)
|
||||
gtk_widget_set_state (GTK_BUTTON (option_menu)->child,
|
||||
GTK_WIDGET (option_menu->menu_item)->state);
|
||||
gtk_widget_unrealize (GTK_BUTTON (option_menu)->child);
|
||||
gtk_widget_reparent (GTK_BUTTON (option_menu)->child, option_menu->menu_item);
|
||||
gtk_widget_unref (option_menu->menu_item);
|
||||
option_menu->menu_item = NULL;
|
||||
|
||||
Reference in New Issue
Block a user