summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-26 17:34:50 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-26 17:34:50 -0300
commitcc7cb041c4144f1401fd520f05018028c0e0c87e (patch)
treecd640c45b66ff4feb0dfde507e4a8c340becf67d /commands.c
parentdc857b78c00432de6d57124ca2e060ef0a76684f (diff)
Proper implementation of AddDoubleClickCallback
I tracked it down to http://cvsweb.xfree86.org/cvsweb/xc/programs/xedit/commands.c?rev=1.5&content-type=text/vnd.viewcvs-markup After my patches to libXaw. Instead of checking for "if (XtIsSubclass(w, asciiSrcObjectClass)) {" it should really do something like "if (isXaw7orNewer) {". But I believe only XFree86 and Xorg versions of Xaw have the XawVersion macro in XawInit.h... This corrects the problem described in http://bugs.freedesktop.org/show_bug.cgi?id=17726 And the main reason is that xedit always default'ed to use a 8 bits iso8859-x locale, while in Xorg it was modified to use multibyte by default.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/commands.c b/commands.c
index 6940d73..fd66200 100644
--- a/commands.c
+++ b/commands.c
@@ -93,24 +93,10 @@ static int dc_state;
static void
AddDoubleClickCallback(Widget w, Bool state)
{
- Arg args[1];
- static XtCallbackRec cb[] = { {NULL, NULL}, {NULL, NULL} };
-
- if (XtIsSubclass(w, asciiSrcObjectClass)) {
- if (state)
- XtAddCallback(w, XtNcallback, ResetDC, NULL);
- else
- XtRemoveCallback(w, XtNcallback, ResetDC, NULL);
- }
- else {
- if (state)
- cb[0].callback = ResetDC;
- else
- cb[0].callback = NULL;
-
- XtSetArg(args[0], XtNcallback, cb);
- XtSetValues(w, args, ONE);
- }
+ if (state)
+ XtAddCallback(w, XtNcallback, ResetDC, NULL);
+ else
+ XtRemoveCallback(w, XtNcallback, ResetDC, NULL);
}
/* Function Name: ResetDC