projects
/
xboard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix castling rights on using -lgf
[xboard.git]
/
xaw
/
xboard.c
diff --git
a/xaw/xboard.c
b/xaw/xboard.c
index
292f7c2
..
ac57033
100644
(file)
--- 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);
}
if(colorVariable[n]) *(char**)colorVariable[n] = strdup(name);
}
+char *
+Col2Text (int n)
+{
+ return *(char**)colorVariable[n];
+}
+
void
ParseTextAttribs (ColorClass cc, char *s)
{
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
}
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?)
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);
}
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;
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) {
} 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--;
szd++;
}
if (szd->name == NULL) szd--;
@@
-1306,6
+1320,9
@@
main (int argc, char **argv)
EngineOutputPopUp();
}
EngineOutputPopUp();
}
+ gameInfo.boardWidth = 0; // [HGM] pieces: kludge to ensure InitPosition() calls InitDrawingSizes()
+ InitPosition(TRUE);
+
InitBackEnd2();
if (errorExitStatus == -1) {
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);
UpdateLogos(TRUE);
// XtSetKeyboardFocus(shellWidget, formWidget);
XSetInputFocus(xDisplay, XtWindow(formWidget), RevertToPointerRoot, CurrentTime);