diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2002-07-26 04:10:23 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2002-07-26 04:10:23 +0000 |
commit | f86655b5744747c2050240c994dd6b24599afef0 (patch) | |
tree | 0366c67c6f7506493beaf0e4a8cb25e5182a10cc /x11-toolkits | |
parent | Update to 1.5.0. (diff) |
. Add a patch to prevent crashes which occur when using XIM and
certain (e.g. Asian) character sets.
. Bump PORTREVISION to reflect this fix.
PR: 30421
Submitted by: Fuyuhiko Maruyama <fuyuhik8@is.titech.ac.jp>
Reviewed by: steve (the patch)
Approved by: steve
Notes
Notes:
svn path=/head/; revision=63583
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/open-motif/Makefile | 2 | ||||
-rw-r--r-- | x11-toolkits/open-motif/files/patch-XmIm.c | 49 |
2 files changed, 50 insertions, 1 deletions
diff --git a/x11-toolkits/open-motif/Makefile b/x11-toolkits/open-motif/Makefile index b5032ddd785f..23112c554855 100644 --- a/x11-toolkits/open-motif/Makefile +++ b/x11-toolkits/open-motif/Makefile @@ -8,7 +8,7 @@ PORTNAME= open-motif PORTVERSION= 2.1.30 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-toolkits MASTER_SITES= ftp://openmotif.opengroup.org/pub/openmotif/R${PORTVERSION}/tars/ \ ftp://ftp.opengroup.org/pub/openmotif/R${PORTVERSION}/tars/ \ diff --git a/x11-toolkits/open-motif/files/patch-XmIm.c b/x11-toolkits/open-motif/files/patch-XmIm.c new file mode 100644 index 000000000000..3f13c4b641df --- /dev/null +++ b/x11-toolkits/open-motif/files/patch-XmIm.c @@ -0,0 +1,49 @@ +--- lib/Xm/XmIm.c.orig Fri Sep 7 10:11:01 2001 ++++ lib/Xm/XmIm.c Sat Sep 8 03:44:14 2001 +@@ -479,6 +479,7 @@ + im_info->current_widget = w; + XtVaGetValues(w, XmNbackground, &bg, NULL); + XtVaSetValues(p, XmNbackground, bg, NULL); ++ ImGeoReq(p); + draw_separator(p); + } + _XmAppUnlock(app); +@@ -1272,6 +1273,7 @@ + XtAddEventHandler(p, (EventMask)mask, False, null_proc, NULL); + } + if (XtIsRealized(p)) { ++ im_info->current_widget = w; + if (XmIsDialogShell(p)) { + for (i = 0; + i < ((CompositeWidget)p)->composite.num_children; +@@ -1282,7 +1284,6 @@ + } + } else + ImGeoReq(p); +- im_info->current_widget = w; + } + /* Is this new XIC supposed to be shared? */ + switch (input_policy) +@@ -2047,10 +2048,18 @@ + rect_preedit.height = icp->sp_height; + } else if ((use_plist = (icp->input_style & XIMPreeditPosition)) != 0) + { +- unsigned int margin = ((XmPrimitiveWidget)im_info->current_widget) +- ->primitive.shadow_thickness +- + ((XmPrimitiveWidget)im_info->current_widget) +- ->primitive.highlight_thickness; ++ unsigned int margin; ++ /* ++ * im_info->current_widget eventually contains NULL, ++ * for example, when widget having XIC focus is disposed. ++ * Thus, we should check this and prevent from touching NULL pointer. ++ */ ++ if (im_info->current_widget == NULL) ++ break; ++ margin = ((XmPrimitiveWidget)im_info->current_widget) ++ ->primitive.shadow_thickness ++ + ((XmPrimitiveWidget)im_info->current_widget) ++ ->primitive.highlight_thickness; + + rect_preedit.width = MIN(icp->preedit_width, + XtWidth(im_info->current_widget) - 2*margin); |