X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=62b696b610af20e2707576a8c67ad05817e98bbe;hb=ee187f36388670ebf4e2666c8118d7344d670ed9;hp=54f9953146b18a5718a4627b363ce0f3b0f8fe78;hpb=869b4ab0aebf0134fb7aed972abc0626dc5fa051;p=xboard.git diff --git a/xboard.c b/xboard.c index 54f9953..62b696b 100644 --- a/xboard.c +++ b/xboard.c @@ -1261,6 +1261,8 @@ main (int argc, char **argv) #else clockFontStruct); #endif + InitDrawingHandle(optList + W_BOARD); + currBoard = &optList[W_BOARD]; boardWidget = optList[W_BOARD].handle; menuBarWidget = optList[W_MENU].handle; dropMenu = optList[W_DROP].handle; @@ -1669,14 +1671,6 @@ SetupDropMenu () } } -cairo_surface_t * -GetOutputSurface(Option *opt, int w, int h) -{ - if(w == 0) w = lineGap + BOARD_WIDTH * (squareSize + lineGap); - if(h == 0) h = lineGap + BOARD_HEIGHT * (squareSize + lineGap); - return cairo_xlib_surface_create(xDisplay, XtWindow(opt->handle), DefaultVisual(xDisplay, 0), w, h); -} - static void do_flash_delay (unsigned long msec) { @@ -1745,7 +1739,6 @@ ReSize (WindowPlacement *wp) if(sqy < sqx) sqx = sqy; if(sqx != squareSize) { squareSize = sqx; // adopt new square size - NewSurfaces(); CreatePNGPieces(); // make newly scaled pieces InitDrawingSizes(0, 0); // creates grid etc. } else ResizeBoardWindow(BOARD_WIDTH * (squareSize + lineGap) + lineGap, BOARD_HEIGHT * (squareSize + lineGap) + lineGap, 0); @@ -1782,7 +1775,7 @@ DelayedDrag () { if(delayedDragID) XtRemoveTimeOut(delayedDragID); // cancel pending delayedDragID = - XtAppAddTimeOut(appContext, 100, (XtTimerCallbackProc) DragProc, (XtPointer) 0); // and schedule new one 50 msec later + XtAppAddTimeOut(appContext, 200, (XtTimerCallbackProc) DragProc, (XtPointer) 0); // and schedule new one 50 msec later } void @@ -1913,7 +1906,7 @@ ModeHighlight () /* Maybe all the enables should be handled here, not just this one */ EnableNamedMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile); - DisplayLogos(optList[W_WHITE-1].handle, optList[W_BLACK+1].handle); + DisplayLogos(&optList[W_WHITE-1], &optList[W_BLACK+1]); } @@ -2561,7 +2554,7 @@ UpdateLogos (int displ) if(optList[W_WHITE-1].handle == NULL) return; LoadLogo(&first, 0, 0); LoadLogo(&second, 1, appData.icsActive); - if(displ) DisplayLogos(optList[W_WHITE-1].handle, optList[W_BLACK+1].handle); + if(displ) DisplayLogos(&optList[W_WHITE-1], &optList[W_BLACK+1]); return; }