Re: Bug #54585



Matthias Clasen <matthiasc poet de> writes:

> Hi,
> 
> the following patch fixes bug #544585 for me. I don't know
> if it is the appropriate fix, though. 

No, it's not the right fix. A size allocate function shouldn't realize
the widget. If this is the right diagnosis of the problem, then
the correct fix is probably to fix the realize function to make the
original location of the window the same place as the size allocate
function would put it.

Regards,
                                        Owen
 
> And I seems I'm not allowed to put the it in bugzilla, thus I'm posting it 
> here.
> 
> Matthias
> 
> 
> Index: gtk/gtkoptionmenu.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkoptionmenu.c,v
> retrieving revision 1.45
> diff -u -r1.45 gtkoptionmenu.c
> --- gtk/gtkoptionmenu.c	2001/05/01 01:36:33	1.45
> +++ gtk/gtkoptionmenu.c	2001/05/29 19:52:16
> @@ -405,10 +405,11 @@
>    gtk_option_menu_get_props (GTK_OPTION_MENU (widget), &props);
>  
>    widget->allocation = *allocation;
> -  if (GTK_WIDGET_REALIZED (widget))
> -    gdk_window_move_resize (widget->window,
> -			    allocation->x, allocation->y,
> -			    allocation->width, allocation->height);
> +
> +  gtk_widget_realize (widget);
> +  gdk_window_move_resize (widget->window,
> +			  allocation->x, allocation->y,
> +			  allocation->width, allocation->height);
>  
>    child = GTK_BIN (widget)->child;
>    if (child && GTK_WIDGET_VISIBLE (child))
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]