X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xhistory.c;h=4f941bf85cf964033b3364567bf9a277f77bd28b;hb=d29830c7ae5d6dd1f92e5ccd9c8eb8b75acfbf5c;hp=c2ac39290d2a540fc31ad3b34a09541d0ce4ff33;hpb=a5acdedf686f954492492595b327089f15de76a0;p=xboard.git diff --git a/xhistory.c b/xhistory.c index c2ac392..4f941bf 100644 --- a/xhistory.c +++ b/xhistory.c @@ -1,7 +1,7 @@ /* * xhistory.c -- Move list window, part of X front end for XBoard * - * Copyright 2000,2009 Free Software Foundation, Inc. + * Copyright 2000, 2009, 2010 Free Software Foundation, Inc. * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -94,6 +94,7 @@ struct History{ struct History *hist=0; String dots=" ... "; Position gameHistoryX, gameHistoryY; +Dimension gameHistoryW; void HistoryPopDown(w, client_data, call_data) @@ -103,12 +104,6 @@ HistoryPopDown(w, client_data, call_data) Arg args[16]; int j; if(hist) { - // [HGM] remember old position - j = 0; - XtSetArg(args[j], XtNx, &gameHistoryX); j++; - XtSetArg(args[j], XtNy, &gameHistoryY); j++; - XtGetValues(hist->sh, args, j); - XtPopdown(hist->sh); hist->Up=False; } @@ -401,6 +396,18 @@ Widget HistoryCreate() strcpy(hist->black[i],""); } + // [HGM] restore old position + j = 0; + XtSetArg(args[j], XtNx, &gameHistoryX); j++; + XtSetArg(args[j], XtNy, &gameHistoryY); j++; + XtSetArg(args[j], XtNwidth, &gameHistoryW); j++; + XtGetValues(shellWidget, args, j); + j = 0; + XtSetArg(args[j], XtNx, gameHistoryX + gameHistoryW); j++; + XtSetArg(args[j], XtNy, gameHistoryY); j++; + XtSetValues(hist->sh, args, j); + XtRealizeWidget(hist->sh); + return hist->sh; } @@ -414,12 +421,6 @@ HistoryPopUp() XtPopup(hist->sh, XtGrabNone); - // [HGM] restore old position - j = 0; - XtSetArg(args[j], XtNx, gameHistoryX); j++; - XtSetArg(args[j], XtNy, gameHistoryY); j++; - XtSetValues(hist->sh, args, j); - j=0; XtSetArg(args[j], XtNleftBitmap, xMarkPixmap); j++; XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Show Move History"),