[11848] in Athena Bugs
Motif v1.2.3 patch missing in motifdev locker ...
daemon@ATHENA.MIT.EDU (jawetzel@MIT.EDU)
Thu Mar 17 10:58:46 1994
From: jawetzel@MIT.EDU
To: bugs@MIT.EDU
Date: Thu, 17 Mar 94 10:58:38 EST
I've noticed that one of my applications is exhibiting a bug that is described
in a Motif patch released in January of this year. I was hoping that you
would update the source code in the motifdev locker so that I could continue
to use these libraries. Just in case you don't already have the patch, I am
including a copy I received via motif-talk.
Jake
---------------- Patch follows below -----------------------------------
[6779] daemon@ATHENA.MIT.EDU (dbrooks@osf.org) Motif_Talk 01/21/94 13:16 (446 lines)
Subject: Patches for Motif 1.2.3
Date: Fri, 21 Jan 94 12:23:48 -0500
From: dbrooks@osf.org
To: motif-talk@osf.org
This message is addressed primarily to those responsible for maintaining
the source of the Motif 1.2.3 release. It will only apply to you if you
have a Full or Update support contract (or received your full source tree
since September 1993).
Since Motif Version 1.2.3 was released, several licensees have reported
regressions. These are features that worked in 1.2.2, but showed errors in
1.2.3. We are sorry these went out undetected.
We have developed patches for those we know about, and fortunately they are
small. Changes, in "diff" format, are at the end of this message. You can
apply these changes to your 1.2.3 source, as shipped by us, using the
"patch" program or by hand. Please make sure you have a backup first.
Note these patches have not been subjected to either the full QA test suite
at OSF or the VTS tests, and are not guaranteed. They are provided as a
courtesy. However, each of them has been applied successfully by at least
one licensee. We expect to fix all these errors in the next patch release,
but the final fix may not use the same code as shown here.
David Brooks
Systems Engineering
Open Software Foundation
================================================================
There are crashes associated with destroying Text and Shell widgets (the
Shell crash happens in Drag-and-Drop code).
This patch also fixes a subtle bug in drag-and-drop which could cause it to
fail to update the drop site information.
These correspond to CRs 6506 (Text) and 6508 (Shell).
*** lib/Xm/TextOut.c.orig Tue Oct 5 14:34:57 1993
--- lib/Xm/TextOut.c Tue Oct 5 14:39:05 1993
***************
*** 634,640 ****
TextGCData gc_data = GetTextGCData((Widget)tw);
if (data->has_rect && gc_data->tw != tw) {
! gc_data->tw->text.output->data->has_rect = False;
data->has_rect = False;
}
gc_data->tw = tw;
--- 634,641 ----
TextGCData gc_data = GetTextGCData((Widget)tw);
if (data->has_rect && gc_data->tw != tw) {
! if (gc_data->tw)
! gc_data->tw->text.output->data->has_rect = False;
data->has_rect = False;
}
gc_data->tw = tw;
***************
*** 3791,3797 ****
--- 3792,3802 ----
Pixmap clip_mask;
OutputData data = widget->text.output->data;
Cardinal depth;
+ TextGCData gc_data = GetTextGCData(w);
+ if (gc_data->tw == widget)
+ gc_data->tw = NULL;
+
if (data->timerid)
XtRemoveTimeOut(data->timerid);
***************
*** 3804,3814 ****
NULL);
XmDestroyPixmap(XtScreen(widget), data->stipple_tile);
-
- if (data->has_rect) {
- TextGCData gc_data = GetTextGCData(w);
- gc_data->tw = NULL;
- }
depth = widget->core.depth;
widget->core.depth = 1;
--- 3809,3814 ----
*** lib/Xm/DropSMgr.c.orig Tue Oct 5 14:53:43 1993
--- lib/Xm/DropSMgr.c Tue Oct 5 14:55:12 1993
***************
*** 4363,4370 ****
XmDSInfo shellInfo;
/* Return if all updates have already happened */
! if (dsm -> dropManager.updateInfo == NULL) return;
!
dsupdate = (_XmDropSiteUpdateInfo) dsm -> dropManager.updateInfo;
shell = refWidget = dsupdate -> refWidget;
dsm -> dropManager.updateInfo = dsupdate -> next;
--- 4363,4369 ----
XmDSInfo shellInfo;
/* Return if all updates have already happened */
! while(dsm -> dropManager.updateInfo != NULL) {
dsupdate = (_XmDropSiteUpdateInfo) dsm -> dropManager.updateInfo;
shell = refWidget = dsupdate -> refWidget;
dsm -> dropManager.updateInfo = dsupdate -> next;
***************
*** 4403,4408 ****
--- 4402,4408 ----
SyncTree(dsm, shell);
}
}
+ }
}
static void
***************
*** 4743,4748 ****
--- 4743,4751 ----
XmDropSiteManagerObject dsm = (XmDropSiteManagerObject) client_data;
DSMDestroyInfo(dsm, widget);
+
+ /* Force Update */
+ _XmIEndUpdate((XtPointer) dsm, (XtIntervalId *) NULL);
}
void
================================================================
In some cases, changing the text of a centered or right-aligned label,
while it is in a Form, can make the label left-aligned. The following
patch to 1.2.3 will fix it. Alternatively, replace the Form resizePolicy
from NONE to ANY and put the resize constraint up on the form parent, like
setting allowShellResize False.
*** /tmp/,RCSt1a06239 Fri Oct 29 16:30:25 1993
--- lib/Xm/Form.c Fri Oct 29 16:28:36 1993
***************
*** 1050,1056
/* check that a real request has failed or that if request_mode was 0,
consider that a No */
! if (g.request_mode && (res != XtGeometryYes)) {
Dimension orig_form_width, orig_form_height ;
/* let's save the original form size first */
--- 1050,1056 -----
/* check that a real request has failed or that if request_mode was 0,
consider that a No */
! if (!g.request_mode || (res != XtGeometryYes)) {
Dimension orig_form_width, orig_form_height ;
/* let's save the original form size first */
================================================================
The builtin image names "vertical" and "horizontal" were accidentally
dropped from the 1.2.3 release.
*** lib/Xm/BitmapsI.h.orig Tue Nov 16 16:33:26 1993
--- lib/Xm/BitmapsI.h Tue Nov 16 16:33:30 1993
***************
*** 48,53 ****
--- 48,63 ----
0x55, 0x55, 0xFF, 0xFF, 0xAA, 0xAA, 0xFF, 0xFF,
0x55, 0x55, 0xFF, 0xFF, 0xAA, 0xAA, 0xFF, 0xFF },
+ { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, /* Vertical tile */
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55 },
+
+ { 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, /* Horizontal tile */
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 },
+
{ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, /* Vertical */
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
***************
*** 95,100 ****
--- 105,114 ----
"75_foreground",
"vertical_tile",
"horizontal_tile",
+ /* for bc reason with 1.2.2, we have to put back the old names,
+ but we also need to keep the new ones, for 1.2.3 users */
+ "vertical",
+ "horizontal",
"slant_right",
"slant_left",
"menu_cascade",
***************
*** 101,106 ****
--- 115,122 ----
"menu_checkmark",
"menu_dash"
};
+
+ #define MAX_BUILTIN_IMAGES 13
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
*** lib/Xm/ImageCache.c.orig Tue Nov 16 16:32:40 1993
--- lib/Xm/ImageCache.c Tue Nov 16 16:33:04 1993
***************
*** 13,20 ****
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
- #include "XmI.h"
#include <Xm/XmosP.h>
#include <Xm/ScreenP.h>
#include "BitmapsI.h"
--- 13,20 ----
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
#include <Xm/XmosP.h>
+ #include "XmI.h"
#include <Xm/ScreenP.h>
#include "BitmapsI.h"
***************
*** 49,55 ****
/* Image array handling defines, structure, and global statics */
- #define MAX_BUILTIN_IMAGES 11
#define INCREMENT_SIZE 10
typedef struct _ImageSet
--- 49,54 ----
================================================================
XmScrollBarGetValues on some scrollbars would not return data to the
"value" field.
*** - Thu Nov 18 16:04:56 1993
--- lib/Xm/ScrollBar.c Thu Nov 18 16:04:43 1993
***************
*** 3945,3953 ****
XmScrollBarWidget sbw = (XmScrollBarWidget) w;
if (sbw->scrollBar.processing_direction == XmMAX_ON_LEFT ||
! sbw->scrollBar.processing_direction == XmMAX_ON_TOP)
if(value) *value = sbw->scrollBar.maximum + sbw->scrollBar.minimum
- sbw->scrollBar.value - sbw->scrollBar.slider_size;
else
if(value) *value = sbw->scrollBar.value;
--- 3945,3954 ----
XmScrollBarWidget sbw = (XmScrollBarWidget) w;
if (sbw->scrollBar.processing_direction == XmMAX_ON_LEFT ||
! sbw->scrollBar.processing_direction == XmMAX_ON_TOP) {
if(value) *value = sbw->scrollBar.maximum + sbw->scrollBar.minimum
- sbw->scrollBar.value - sbw->scrollBar.slider_size;
+ }
else
if(value) *value = sbw->scrollBar.value;
================================================================
The valueChanged callback isn't getting called as a result of
XmTextSetString.
*** /tmp/,RCSt1a07181 Thu Nov 18 15:47:45 1993
--- lib/Xm/TextStrSo.c Thu Nov 4 17:36:57 1993
***************
*** 3,9
* ALL RIGHTS RESERVED
*/
/*
! * Motif Release 1.2.3
*/
#ifdef REV_INFO
#ifndef lint
--- 3,9 -----
* ALL RIGHTS RESERVED
*/
/*
! * Motif Release 1.2.3 - CR 6806 fixed
*/
#ifdef REV_INFO
#ifndef lint
***************
*** 2780,2785
(void)(source->Replace)(widget, NULL, &fromPos, &toPos,
&newblock, False);
if (freeBlock && newblock.ptr) XtFree(newblock.ptr);
}
data->editable = editable;
--- 2780,2786 -----
(void)(source->Replace)(widget, NULL, &fromPos, &toPos,
&newblock, False);
if (freeBlock && newblock.ptr) XtFree(newblock.ptr);
+ _XmTextValueChanged(widget, NULL);
}
data->editable = editable;
================================================================
If an option menu is not yet realized, and XmNmenuHistory gets set
on its submenu instead of on the menu itself, the new value just
never gets set. From the application programmer's point of view
it looks like the set values call just silently failed.
Workaround: Set XmNmenuHistory on the option menu itself.
*** lib/Xm/RowColumn.c.orig Thu Jan 6 15:08:55 1994
--- lib/Xm/RowColumn.c Thu Jan 6 15:16:01 1994
***************
*** 3,9 ****
* ALL RIGHTS RESERVED
*/
/*
! * Motif Release 1.2.3
*/
#ifdef REV_INFO
#ifndef lint
--- 3,9 ----
* ALL RIGHTS RESERVED
*/
/*
! * Motif Release 1.2.3 -- menuHistory fix added
*/
#ifdef REV_INFO
#ifndef lint
***************
*** 2175,2180 ****
--- 2175,2184 ----
{
Widget cb;
+ if (RC_OptionSubMenu(menu) && RC_MemWidget(RC_OptionSubMenu(menu))) {
+ RC_MemWidget(menu) = RC_MemWidget(RC_OptionSubMenu(menu));
+ }
+ else {
RC_MemWidget(menu) =
find_first_managed_child((CompositeWidget) RC_OptionSubMenu(menu),
True);
***************
*** 2181,2186 ****
--- 2185,2191 ----
/* For what it's worth - nothing in SharedMenupanes */
if (RC_OptionSubMenu(menu))
RC_MemWidget(RC_OptionSubMenu(menu)) = RC_MemWidget(menu);
+ }
if ((cb = XmOptionButtonGadget( (Widget) menu)) != NULL)
UpdateOptionMenuCBG (cb, RC_MemWidget(menu));
}
================================================================
A new warning is generated if a space appears after the comma in a fontList
specification.
*** lib/Xm/ResConvert.c.orig Thu Jan 6 17:10:29 1994
--- lib/Xm/ResConvert.c Thu Jan 6 17:12:11 1994
***************
*** 3,9 ****
* ALL RIGHTS RESERVED
*/
/*
! * Motif Release 1.2.3
*/
#ifdef REV_INFO
#ifndef lint
--- 3,9 ----
* ALL RIGHTS RESERVED
*/
/*
! * Motif Release 1.2.3 -- font conversion message fixed
*/
#ifdef REV_INFO
#ifndef lint
***************
*** 1474,1486 ****
while (**s != '\0' && isspace((unsigned char)**s))
{
- /* CR4721 */
- params[0] = --(*name);
- num_params = 1;
- XtWarningMsg("conversionWarning", "string", "XtToolkitError",
- "Unmatched quotation marks in string \"%s\", any remaining fonts in list unparsed",
- params, &num_params);
-
(*s)++;
}
if (**s == '\0')
--- 1474,1479 ----
***************
*** 1503,1508 ****
--- 1496,1508 ----
}
if (**s == '\0')
{
+ /* CR4721 */
+ params[0] = --(*name);
+ num_params = 1;
+ XtWarningMsg("conversionWarning", "string", "XtToolkitError",
+ "Unmatched quotation marks in string \"%s\", any remaining fonts in list unparsed",
+ params, &num_params);
+
return (FALSE);
}
**s = '\0';
================================================================
This fixes a crash that happens status or pre-edit information is displayed
in an off-the-spot IM area.
*** lib/Xm/XmIm.c.orig Fri Jan 21 10:03:46 1994
--- lib/Xm/XmIm.c Fri Jan 21 10:05:25 1994
***************
*** 1105,1110 ****
--- 1105,1113 ----
XRectangle rect;
XRectangle *rp;
+ if (!icp->xic)
+ return;
+
if (icp->input_style & XIMStatusArea ||
icp->input_style & XIMPreeditArea)
{
--[6779]--