Fix fos bugzilla bug 1074. Assert and crash in tooltip stage two handler.

This commit is contained in:
ramiro%netscape.com 1998-10-13 04:26:38 +00:00
Родитель 7e738b27c5
Коммит 51c45ef132
1 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -717,6 +717,18 @@ TipStringEnterItem(Widget w,_XfeTipItemInfo info)
if (_XfeToolTipIsLocked())
{
_xfe_tt_stage_one_target = NULL;
/* Remove the timeout if its still active */
StageTwoRemoveTimeout(w);
_xfe_tt_stage_two_target = NULL;
_XfeToolTipUnlock();
/* printf("TipStringEnterItem(%s): tool tips are locked - abort\n", */
/* XtName(w)); */
#ifdef DEBUG_TOOL_TIPS
printf("TipStringEnterItem(%s): tool tips are locked - abort\n",
XtName(w));
@ -725,6 +737,10 @@ TipStringEnterItem(Widget w,_XfeTipItemInfo info)
_XfeToolTipLock();
#ifdef DEBUG_TOOL_TIPS
printf("TipStringEnterItem: stage_one_target = %s\n",XtName(w));
#endif
_xfe_tt_stage_one_target = w;
StageTwoAddTimeout(w);
@ -744,6 +760,10 @@ TipStringLeaveItem(Widget w,_XfeTipItemInfo info)
/* If a target exists, reset it so that stage two aborts */
if (_XfeIsAlive(_xfe_tt_stage_one_target))
{
#ifdef DEBUG_TOOL_TIPS
printf("TipStringLeaveItem: stage_one_target = NULL\n");
#endif
_xfe_tt_stage_one_target = NULL;
}
@ -962,6 +982,10 @@ StageTwoTimeout(XtPointer closure,XtIntervalId * id)
if (_XfeIsAlive(_xfe_tt_stage_one_target))
{
assert( w == _xfe_tt_stage_one_target);
#ifdef DEBUG_TOOL_TIPS
printf("StageTwoTimeout: stage_one_target = NULL\n");
#endif
/* Reset the stage one target */
_xfe_tt_stage_one_target = NULL;