From 2cb4a110b66e8c1aef35ce2309596b0d81880561 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 28 Nov 2010 20:24:46 +0100 Subject: [PATCH] Let move-history window scroll to bottom after adding move By activating the scrollbar of the viewport through XtCallActionProc the move-history window is scrolled to the bottom. --- xhistory.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/xhistory.c b/xhistory.c index 008d4ca..76e3239 100644 --- a/xhistory.c +++ b/xhistory.c @@ -224,6 +224,7 @@ HistoryFill() void HistorySet(char movelist[][2*MOVE_LEN],int first,int last,int current){ int i,b,m; + Widget scroll; if(hist){ if(last >= hist->aNr) HistoryAlloc(last+_LL_); for(i=0;imvb, current/2+1); else XawListUnhighlight(hist->mvb); } + if(scroll = XtNameToWidget(hist->sh, "*form.viewport.vertical")) { // [HGM] always scroll to bottom + static char *params[3] = { "", "Forward", "FullLength" }; + static XEvent event; + XtCallActionProc(scroll, "StartScroll", &event, params+1, 1); + XtCallActionProc(scroll, "NotifyScroll", &event, params+2, 1); + XtCallActionProc(scroll, "EndScroll", &event, params, 0); + } } EvalGraphSet( first, last, current, pvInfoList ); // piggy-backed } -- 1.7.0.4