X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxoptions.c;h=fb872ce3b54deebb91d34cf26e3bb6cf85301d39;hb=e5b66e5d3691c26f964cc9ace83baecb4c5e87ec;hp=90a45eae19dc5a8c1ed9e41d0688a0bbe7bc4ba5;hpb=165dd54f68ac49be0b50c3d2e1c5c054decdc5ac;p=xboard.git diff --git a/gtk/xoptions.c b/gtk/xoptions.c index 90a45ea..fb872ce 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -823,8 +823,15 @@ GraphEventProc(GtkWidget *widget, GdkEvent *event, gpointer gdata) // to give drawing routines opportunity to use it before first expose event // (which are only processed when main gets to the event loop, so after all init!) // so only change when size is no longer good + cairo_t *cr; if(graph->choice) cairo_surface_destroy((cairo_surface_t *) graph->choice); graph->choice = (char**) cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h); + // paint white, to prevent weirdness when people maximize window and drag pieces over space next to board + cr = cairo_create ((cairo_surface_t *) graph->choice); + cairo_rectangle (cr, 0, 0, w, h); + cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0); + cairo_fill(cr); + cairo_destroy (cr); break; } w = eevent->area.width;