X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xgamelist.c;fp=xgamelist.c;h=abccb04db183a3e3f35dd0ed96d939c4a7e7af12;hb=f95d2445401b6419ede201531c31628c81b8ffdd;hp=2d3ce029da675d11af076479ddf54206b4d1d1f9;hpb=dd54cd392e6906b7a19b1ad57ed1e5d748ad6c7c;p=xboard.git diff --git a/xgamelist.c b/xgamelist.c index 2d3ce02..abccb04 100644 --- a/xgamelist.c +++ b/xgamelist.c @@ -101,6 +101,8 @@ char gameListTranslations[] = "(2): LoadSelectedProc(0) \n \ Home: LoadSelectedProc(-2) \n \ End: LoadSelectedProc(2) \n \ + CtrlUp: LoadSelectedProc(-3) \n \ + CtrlDown: LoadSelectedProc(3) \n \ Up: LoadSelectedProc(-1) \n \ Down: LoadSelectedProc(1) \n \ Left: LoadSelectedProc(-1) \n \ @@ -570,18 +572,22 @@ LoadSelectedProc(w, event, prms, nprms) } if(direction != 0) { + int doLoad = abs(direction) > 2; + if(doLoad) direction /= 3; index += direction; if(direction == -2) index = 0; if(direction == 2) index = listLength-1; if(index < 0 || index >= listLength) return; XawListHighlight(listwidg, index); - return; + if(!doLoad) return; } index = atoi(list[index])-1; // [HGM] filter: read true index from sequence nr of line if (cmailMsgLoaded) { CmailLoadGame(glc->fp, index + 1, glc->filename, True); } else { LoadGame(glc->fp, index + 1, glc->filename, True); + XSync(xDisplay, False); + XSetInputFocus(xDisplay, XtWindow(boardWidget), RevertToPointerRoot, CurrentTime); } }