diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 44475d64fe..60e6dbf661 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -636,7 +636,7 @@ static gint gtk_button_expose (GtkWidget *widget, GdkEventExpose *event) { - GtkButton *button; + GtkButton *bin; GdkEventExpose child_event; g_return_val_if_fail (widget != NULL, FALSE); @@ -645,14 +645,14 @@ gtk_button_expose (GtkWidget *widget, if (GTK_WIDGET_DRAWABLE (widget)) { - button = GTK_BUTTON (widget); + bin = GTK_BIN (widget); gtk_button_paint (widget, &event->area); child_event = *event; - if (GTK_BIN (button)->child && GTK_WIDGET_NO_WINDOW (GTK_BIN (button)->child) && - gtk_widget_intersect (GTK_BIN (button)->child, &event->area, &child_event.area)) - gtk_widget_event (GTK_BIN (button)->child, (GdkEvent*) &child_event); + if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) && + gtk_widget_intersect (bin->child, &event->area, &child_event.area)) + gtk_widget_event (bin->child, (GdkEvent*) &child_event); } return FALSE; diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 5bb11e08f8..b73581e959 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -1971,12 +1971,12 @@ gtk_widget_clip_rect (GtkWidget *widget, if (rect->x < 0) { - rect->width = (width > -rect->x) ? width + rect->x : 0; + rect->width = (rect->width > -rect->x) ? rect->width + rect->x : 0; rect->x = 0; } if (rect->y < 0) { - rect->height = (height > -rect->y) ? width + rect->y : 0; + rect->height = (rect->height > -rect->y) ? rect->width + rect->y : 0; rect->y = 0; } if (rect->x + rect->width > width)