diff options
author | glewis <glewis@FreeBSD.org> | 2002-07-26 12:10:23 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2002-07-26 12:10:23 +0800 |
commit | 740bc8913adb83ffea652c982a73226ad28f7452 (patch) | |
tree | 007f6d1a2e89c2738523223446e8a11a835de4cc /x11-toolkits/open-motif | |
parent | 327dabc54c3900f4ba315e3b2c222f10d40e0bfc (diff) | |
download | freebsd-ports-gnome-740bc8913adb83ffea652c982a73226ad28f7452.tar.gz freebsd-ports-gnome-740bc8913adb83ffea652c982a73226ad28f7452.tar.zst freebsd-ports-gnome-740bc8913adb83ffea652c982a73226ad28f7452.zip |
. 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
Diffstat (limited to 'x11-toolkits/open-motif')
-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); |