]> err.no Git - mapper/commitdiff
Small optimizations to compass widget
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 11 Oct 2007 09:43:00 +0000 (12:43 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 11 Oct 2007 09:43:00 +0000 (12:43 +0300)
src/gtkcompass.c

index 260b147e79f0e3c65748b142b639743c96283f53..d2936d41d1a25fac6e277525c5f5e9c766506c9a 100644 (file)
@@ -406,6 +406,7 @@ static gboolean
 gtk_compass_expose(GtkWidget *widget, GdkEventExpose *event)
 {
 GtkCompass *compass;
+
 g_return_val_if_fail(GTK_IS_COMPASS(widget), FALSE);
 g_return_val_if_fail(event != NULL, FALSE);
 
@@ -422,7 +423,7 @@ GtkCompass *compass;
 g_return_if_fail(GTK_IS_COMPASS(widget));
 
 compass=GTK_COMPASS(widget);
-gtk_compass_paint(compass);
+gtk_widget_queue_draw_area(widget, 0, 0, compass->width, compass->height);
 }
 
 void 
@@ -436,7 +437,7 @@ compass=GTK_COMPASS(widget);
 compass->way_valid=valid;
 compass->way_heading=heading;
 
-gtk_compass_paint(compass);
+gtk_widget_queue_draw_area(widget, 0, 0, compass->width, compass->height);
 }
 
 void 
@@ -451,6 +452,6 @@ compass->dest_valid=valid;
 compass->dest_heading=heading;
 
 compass=GTK_COMPASS(widget);
-gtk_compass_paint(compass);
+gtk_widget_queue_draw_area(widget, 0, 0, compass->width, compass->height);
 }