- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix, iy);
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix+1, iy);
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix, iy+1);
- gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->mainwin->style->black_gc : ui->mainwin->style->white_gc, ix+1, iy+1);
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix, iy);
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix+1, iy);
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix, iy+1);
+ gdk_draw_point(GDK_DRAWABLE(ui->pixmap), state ? ui->darea->style->black_gc : ui->darea->style->white_gc, ix+1, iy+1);
+
+ gtk_widget_draw (GTK_WIDGET(ui->darea), &update_rect);
+}
+
+void clear_display(oswald_ui *ui)
+{
+ GdkRectangle update_rect;
+
+ update_rect.x = 0;
+ update_rect.y = 0;
+ update_rect.width = BITMAP_WIDTH;
+ update_rect.height = BITMAP_HEIGHT;
+
+ gdk_draw_rectangle (ui->pixmap,
+ ui->darea->style->white_gc,
+ TRUE,
+ 0, 0,
+ ui->darea->allocation.width,
+ ui->darea->allocation.height);