Fix 1-pixel offset of grid lines on some cairo implementations
[xboard.git] / xoptions.c
index 6993ab2..979399a 100644 (file)
@@ -565,9 +565,11 @@ GraphEventProc(Widget widget, caddr_t client_data, XEvent *event)
                         // so only change when size is no longer good
                if(graph->choice) cairo_surface_destroy((cairo_surface_t *) graph->choice);
                graph->choice = (char**) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
+               break;
            }
            cr = cairo_create((cairo_surface_t *) graph->textValue);
            cairo_set_source_surface(cr, (cairo_surface_t *) graph->choice, 0, 0);
+           cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
            cairo_rectangle(cr, ((XExposeEvent*)event)->x, ((XExposeEvent*)event)->y, ((XExposeEvent*)event)->width, ((XExposeEvent*)event)->height);
            cairo_fill(cr);
            cairo_destroy(cr);