mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
. 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
This commit is contained in:
parent
73e8662630
commit
f86655b574
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=63583
@ -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/ \
|
||||
|
49
x11-toolkits/open-motif/files/patch-XmIm.c
Normal file
49
x11-toolkits/open-motif/files/patch-XmIm.c
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user