From: H.G. Muller Date: Sat, 25 Feb 2012 10:55:19 +0000 (+0100) Subject: Make frame width configurable in XB X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a6ae4e1711147118d14b51ff929e15b7198ba5f7;p=xboard.git Make frame width configurable in XB New persistent options -frameX, -frameY now can be used to specify the amount by which Xt lies about the window coordinates. --- diff --git a/args.h b/args.h index 613f0a4..b8061d9 100644 --- a/args.h +++ b/args.h @@ -104,6 +104,7 @@ IcsTextMenuEntry icsTextMenuEntry[ICS_TEXT_MENU_SIZE]; int junk; Boolean singleList; char *homeDir; +int frameX, frameY; // width of window frame and title bar void EnsureOnScreen(int *x, int *y, int minX, int minY); char StringGet(void *getClosure); @@ -715,8 +716,10 @@ ArgDescriptor argDescriptors[] = { { "useInternalWrap", ArgTrue, (void *) &appData.useInternalWrap, FALSE, INVALID }, /* noJoin usurps this if set */ // [HGM] placement: put all window layouts last in ini file, but man X,Y before all others - { "minX", ArgZ, (void *) &minX, FALSE, INVALID }, // [HGM] placement: to make suer auxialary windows can be placed + { "minX", ArgZ, (void *) &minX, FALSE, INVALID }, // [HGM] placement: to make sure auxiliary windows can be placed { "minY", ArgZ, (void *) &minY, FALSE, INVALID }, + { "frameX", ArgInt, (void *) &frameX, XBOARD, (ArgIniType) 2 }, // [HGM] placement: correction for lying X11 + { "frameY", ArgInt, (void *) &frameY, XBOARD, (ArgIniType) 22 }, { "winWidth", ArgInt, (void *) &wpMain.width, TRUE, INVALID }, // [HGM] placement: dummies to remember right & bottom { "winHeight", ArgInt, (void *) &wpMain.height, TRUE, INVALID }, // for attaching auxiliary windows to them { "x", ArgInt, (void *) &wpMain.x, TRUE, (ArgIniType) CW_USEDEFAULT }, diff --git a/xboard.c b/xboard.c index 0b3c7f4..a1a41b9 100644 --- a/xboard.c +++ b/xboard.c @@ -1572,8 +1572,8 @@ GetActualPlacement (Widget wg, WindowPlacement *wp) XtSetArg(args[i], XtNwidth, &w); i++; XtSetArg(args[i], XtNheight, &h); i++; XtGetValues(wg, args, i); - wp->x = x - 4; - wp->y = y - 23; + wp->x = x - frameX; + wp->y = y - frameY; wp->height = h; wp->width = w; }