diff options
author | Gnome CVS User <gnomecvs@src.gnome.org> | 1997-11-25 06:49:03 +0000 |
---|---|---|
committer | Gnome CVS User <gnomecvs@src.gnome.org> | 1997-11-25 06:49:03 +0000 |
commit | c82e82dafc507469f48547702841f0946a888104 (patch) | |
tree | d58d8a73cef863df7f527ced1fe564c82af2a053 /gtk/gtkaspectframe.c | |
parent | ba1d51293cf95346d98a2fedf27af4184ea6e54d (diff) | |
download | gtk+-c82e82dafc507469f48547702841f0946a888104.tar.gz |
gtk-dairiki-971117-0.patch
Clear window when aspect ratio or alignment is changed. -Jay
Diffstat (limited to 'gtk/gtkaspectframe.c')
-rw-r--r-- | gtk/gtkaspectframe.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c index 2e4795bcae..2e6594fea8 100644 --- a/gtk/gtkaspectframe.c +++ b/gtk/gtkaspectframe.c @@ -124,13 +124,22 @@ gtk_aspect_frame_set (GtkAspectFrame *aspect_frame, (aspect_frame->ratio != ratio) || (aspect_frame->obey_child != obey_child)) { + GtkWidget * this = GTK_WIDGET(aspect_frame); + aspect_frame->xalign = xalign; aspect_frame->yalign = yalign; aspect_frame->ratio = ratio; aspect_frame->obey_child = obey_child; - gtk_widget_size_allocate (GTK_WIDGET (aspect_frame), &(GTK_WIDGET (aspect_frame)->allocation)); - gtk_widget_queue_draw (GTK_WIDGET (aspect_frame)); + if (GTK_WIDGET_MAPPED(this)) + gdk_window_clear_area (this->window, + this->allocation.x, + this->allocation.y, + this->allocation.width, + this->allocation.height); + + gtk_widget_size_allocate (this, &this->allocation); + gtk_widget_queue_draw (this); } } |