X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxboard.c;h=8d0fb2446b89d5592fc43e4a172e1c93f1746e08;hb=fcdae93cdc0700e2680e15aaecdaf1eefa8940cd;hp=292f7c2320cbb98f2e016df5927eceb44fed76e5;hpb=27f670dbe352c1333448bb137a6aa008e4cdf3ad;p=xboard.git diff --git a/xaw/xboard.c b/xaw/xboard.c index 292f7c2..8d0fb24 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) { @@ -639,6 +645,12 @@ GetActualPlacement (Widget wg, WindowPlacement *wp) } 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?) // In XBoard this will have to wait until awareness of window parameters is implemented @@ -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--;