X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=b95cb2274d6c8249251db7e030698eb822e4364f;hb=ee7ad29e757ab4f99b8b776ce7e8ebee5081767a;hp=55a3935f39f93ed5dc58a3b87898282eb0681e32;hpb=a61f78756889e18aa279dc273bd99b9af60468d7;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 55a3935..b95cb22 100644 --- a/xoptions.c +++ b/xoptions.c @@ -807,12 +807,16 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent if(option[i].type == FileName || option[i].type == PathName) w -= 55; j = SetPositionAndSize(args, dialog, last, 1 /* border */, w /* w */, option[i].type == TextBox ? option[i].value : 0 /* h */, 0x91 /* chain full width */); - if(option[i].type == TextBox && option[i].value) { // decorations for multi-line text-edits + if(option[i].type == TextBox) { // decorations for multi-line text-edits if(option[i].min & T_VSCRL) { XtSetArg(args[j], XtNscrollVertical, XawtextScrollAlways); j++; } if(option[i].min & T_HSCRL) { XtSetArg(args[j], XtNscrollHorizontal, XawtextScrollAlways); j++; } if(option[i].min & T_FILL) { XtSetArg(args[j], XtNautoFill, True); j++; } if(option[i].min & T_WRAP) { XtSetArg(args[j], XtNwrap, XawtextWrapWord); j++; } - if(option[i].min & T_TOP) { XtSetArg(args[j], XtNtop, XtChainTop); j++; } + if(option[i].min & T_TOP) { XtSetArg(args[j], XtNtop, XtChainTop); j++; + if(!option[i].value) { XtSetArg(args[j], XtNbottom, XtChainTop); j++; + XtSetValues(dialog, args+j-2, 2); + } + } } else shrink = TRUE; XtSetArg(args[j], XtNeditType, XawtextEdit); j++; XtSetArg(args[j], XtNuseStringInPlace, False); j++; @@ -1149,7 +1153,7 @@ SetInsertPos (Option *opt, int pos) XtSetArg(args[0], XtNinsertPosition, pos); XtSetValues(opt->handle, args, 1); // SetFocus(opt->handle, shells[InputBoxDlg], NULL, False); // No idea why this does not work, and the following is needed: - XSetInputFocus(xDisplay, XtWindow(opt->handle), RevertToPointerRoot, CurrentTime); +// XSetInputFocus(xDisplay, XtWindow(opt->handle), RevertToPointerRoot, CurrentTime); } void