X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=097f881fac98a50f2d2cba01488e3a9c955b8fce;hb=72e9d0869ebce6cf01801355608979d0fe18d2b6;hp=bf1ff104ea797715f93c4f5bed03604f7a71e0a3;hpb=997b54f179fb1834d738042a9b6c4ec1cefe8c6b;p=xboard.git diff --git a/xoptions.c b/xoptions.c index bf1ff10..097f881 100644 --- a/xoptions.c +++ b/xoptions.c @@ -551,10 +551,12 @@ GraphEventProc(Widget widget, caddr_t client_data, XEvent *event) XtSetArg(args[j], XtNwidth, &w); j++; XtSetArg(args[j], XtNheight, &h); j++; XtGetValues(widget, args, j); + if(w < graph->max || w > graph->max + 1 || h != graph->value) { // use width fudge of 1 pixel - sizing = (((XExposeEvent*)event)->count >= 0); // suppress sizing on ordered redraw in response to sizing. + sizing = (((XExposeEvent*)event)->count >= 0); // suppress sizing on expose for ordered redraw in response to sizing. graph->max = w; graph->value = h; // note: old values are kept if we we don't exceed width fudge - } + } else w = graph->max; + if(sizing && ((XExposeEvent*)event)->count > 0) { graph->max = 0; return; } // don't bother if further exposure is pending during resize if(!graph->textValue || sizing) { // create surfaces of new size for display widget if(graph->textValue) cairo_surface_destroy((cairo_surface_t *)graph->textValue);