X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xengineoutput.c;h=10c59bf6e0ed8245111dbc1a9de4eb388bafbd3b;hb=8746a61117e305a0cc3c2a113464a7a3d9c1230d;hp=7162631439eed35994bb05522afe02bf824b235a;hpb=18fe8fec4c8638dccb0c59c781a9ad900ddb3043;p=xboard.git diff --git a/xengineoutput.c b/xengineoutput.c index 7162631..10c59bf 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -115,7 +115,6 @@ int EngineOutputIsUp(); void SetEngineColorIcon( int which ); /* Imports from backend.c */ -char * SavePart(char *str); extern int opponentKibitzes; /* Imports from xboard.c */ @@ -184,6 +183,10 @@ void InsertIntoMemo( int which, char * text, int where ) { Arg arg; XawTextBlock t; Widget edit; + /* the backend adds \r\n, which is needed for winboard, + * for xboard we delete them again over here */ + if(t.ptr = strchr(text, '\r')) *t.ptr = ' '; + t.ptr = text; t.firstPos = 0; t.length = strlen(text); t.format = XawFmt8Bit; edit = XtNameToWidget(engineOutputShell, which ? "*form2.text" : "*form.text"); XawTextReplace(edit, where, where, &t); @@ -366,6 +369,13 @@ Widget EngineOutputCreate(name, text) XtRealizeWidget(shell); + if(wpEngineOutput.width > 0) { + engineOutputW = wpEngineOutput.width; + engineOutputH = wpEngineOutput.height; + engineOutputX = wpEngineOutput.x; + engineOutputY = wpEngineOutput.y; + } + if (engineOutputX == -1) { int xx, yy; Window junk; @@ -499,6 +509,10 @@ void EngineOutputPopDown() XtSetArg(args[j], XtNwidth, &engineOutputW); j++; XtSetArg(args[j], XtNheight, &engineOutputH); j++; XtGetValues(engineOutputShell, args, j); + wpEngineOutput.x = engineOutputX - 4; + wpEngineOutput.y = engineOutputY - 23; + wpEngineOutput.width = engineOutputW; + wpEngineOutput.height = engineOutputH; XtPopdown(engineOutputShell); XSync(xDisplay, False); j=0;