From 54da5e9522d662655631f4e76e90381d6e6bb84d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 26 Feb 2013 16:47:58 +0100 Subject: [PATCH] Work-around for Xt selection bug In some Xt implementations calling extend-end with 0 params causes a crash, although the mmanual specifies this should default to a call with 'PRIMARY'. The default selection is now explicitly mentioned in all extend-end calls. --- xaw/xboard.c | 2 +- xaw/xengineoutput.c | 4 ++-- xaw/xhistory.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xaw/xboard.c b/xaw/xboard.c index e162be7..7986db9 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -418,7 +418,7 @@ char ICSInputTranslations[] = // [HGM] vari: another hideous kludge: call extend-end first so we can be sure select-start works, // as the widget is destroyed before the up-click can call extend-end -char commentTranslations[] = ": extend-end() select-start() CommentClick() \n"; +char commentTranslations[] = ": extend-end(PRIMARY) select-start() CommentClick() \n"; String xboardResources[] = { "*Error*translations: #override\\n Return: ErrorPopDown()", diff --git a/xaw/xengineoutput.c b/xaw/xengineoutput.c index 1a63866..fb2b565 100644 --- a/xaw/xengineoutput.c +++ b/xaw/xengineoutput.c @@ -165,8 +165,8 @@ InsertIntoMemo (int which, char * text, int where) char memoTranslations[] = ":Ctrlc: CopyMemoProc() \n \ : HandlePV() \n \ -Shift: select-start() extend-end() SelectPV(1) \n \ -Any: select-start() extend-end() SelectPV(0) \n \ +Shift: select-start() extend-end(PRIMARY) SelectPV(1) \n \ +Any: select-start() extend-end(PRIMARY) SelectPV(0) \n \ : StopPV() \n"; void diff --git a/xaw/xhistory.c b/xaw/xhistory.c index 8b6adb1..edaf8c3 100644 --- a/xaw/xhistory.c +++ b/xaw/xhistory.c @@ -99,7 +99,7 @@ ScrollToCursor (Option *opt, int caretPos) char *historyText; char historyTranslations[] = ": select-start() \n \ -: extend-end() SelectMove() \n"; +: extend-end(PRIMARY) SelectMove() \n"; void SelectMoveX (Widget w, XEvent * event, String * params, Cardinal * nParams) -- 1.7.0.4