X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=979399af8edb20fc9df6aee3db3cf15cf7868b48;hb=89765faf3da5d11d2113bdf25ef13f936d118589;hp=70ab43195f8a6ee72d4a5885d853bbc94424d3db;hpb=faa0fea4cf9cc9de2d73add4695af3ed06517787;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 70ab431..979399a 100644 --- a/xoptions.c +++ b/xoptions.c @@ -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); @@ -599,10 +601,9 @@ GraphEventProc(Widget widget, caddr_t client_data, XEvent *event) } void -DrawExpose (Option *opt, int x, int y, int w, int h) +GraphExpose (Option *opt, int x, int y, int w, int h) { XExposeEvent e; - opt = &mainOptions[W_BOARD]; if(!opt->handle) return; e.x = x; e.y = y; e.width = w; e.height = h; e.count = -1; e.type = Expose; // count = -1: kludge to suppress sizing GraphEventProc(opt->handle, (caddr_t) opt, (XEvent *) &e); // fake expose event