From: Kaj-Michael Lang Date: Thu, 11 Oct 2007 09:43:00 +0000 (+0300) Subject: Small optimizations to compass widget X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89807c63652b9f1939d5e72abc93eb3bce8db67d;p=mapper Small optimizations to compass widget --- diff --git a/src/gtkcompass.c b/src/gtkcompass.c index 260b147..d2936d4 100644 --- a/src/gtkcompass.c +++ b/src/gtkcompass.c @@ -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); }