X-Git-Url: http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=xboard.git;a=blobdiff_plain;f=xaw%2Fxboard.c;h=ac57033486db7a5f66a94a30ca83daa992e30d3f;hp=292f7c2320cbb98f2e016df5927eceb44fed76e5;hb=5ac80d2f3c2a7720f3095a8e4145b1780494dfd2;hpb=27f670dbe352c1333448bb137a6aa008e4cdf3ad diff --git a/xaw/xboard.c b/xaw/xboard.c index 292f7c23..ac570334 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -537,6 +537,12 @@ ParseColor (int n, char *name) if(colorVariable[n]) *(char**)colorVariable[n] = strdup(name); } +char * +Col2Text (int n) +{ + return *(char**)colorVariable[n]; +} + void ParseTextAttribs (ColorClass cc, char *s) { @@ -638,6 +644,12 @@ GetActualPlacement (Widget wg, WindowPlacement *wp) frameX = winAt.x; frameY = winAt.y; // remember to decide if windows touch } +void +GetPlacement (DialogClass dlg, WindowPlacement *wp) +{ // wrapper to shield back-end from widget type + if(shellUp[dlg]) GetActualPlacement(shells[dlg], wp); +} + void GetWindowCoords () { // wrapper to shield use of window handles from back-end (make addressible by number?) @@ -1103,6 +1115,8 @@ main (int argc, char **argv) programName, appData.boardSize); exit(2); } + if(BOARD_WIDTH > 8) + squareSize = (squareSize*8 + BOARD_WIDTH/2)/BOARD_WIDTH; // scale height if (i < 7) { /* Find some defaults; use the nearest known size */ SizeDefaults *szd, *nearest; @@ -1126,8 +1140,8 @@ main (int argc, char **argv) } else { SizeDefaults *szd = sizeDefaults; if (*appData.boardSize == NULLCHAR) { - while (DisplayWidth(xDisplay, xScreen) < szd->minScreenSize || - DisplayHeight(xDisplay, xScreen) < szd->minScreenSize) { + while (DisplayWidth(xDisplay, xScreen) < (szd->minScreenSize*BOARD_WIDTH + 4)/8 || + DisplayHeight(xDisplay, xScreen) < (szd->minScreenSize*BOARD_HEIGHT + 4)/8) { szd++; } if (szd->name == NULL) szd--; @@ -1306,6 +1320,9 @@ main (int argc, char **argv) EngineOutputPopUp(); } + gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() + InitPosition(TRUE); + InitBackEnd2(); if (errorExitStatus == -1) { @@ -1326,8 +1343,6 @@ main (int argc, char **argv) } } - gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes() - InitPosition(TRUE); UpdateLogos(TRUE); // XtSetKeyboardFocus(shellWidget, formWidget); XSetInputFocus(xDisplay, XtWindow(formWidget), RevertToPointerRoot, CurrentTime);