Fix for bugzilla bug 955 just filed by akkana. Tooltip shell was using the

wrong visual and depth info.
This commit is contained in:
ramiro%netscape.com 1998-10-01 01:01:03 +00:00
Родитель 9e92ffbd7c
Коммит 41f2483398
3 изменённых файлов: 25 добавлений и 11 удалений

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

@ -263,6 +263,12 @@ XfeAncestorFindApplicationShell(Widget w)
return XfeAncestorFindByClass(w,applicationShellWidgetClass,XfeFIND_ANY);
}
/*----------------------------------------------------------------------*/
/* extern */ Widget
XfeAncestorFindShell(Widget w)
{
return XfeAncestorFindByClass(w,shellWidgetClass,XfeFIND_ANY);
}
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
/* */

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

@ -127,6 +127,9 @@ XfeAncestorFindTopLevelShell (Widget w);
extern Widget
XfeAncestorFindApplicationShell (Widget w);
/*----------------------------------------------------------------------*/
extern Widget
XfeAncestorFindShell (Widget w);
/*----------------------------------------------------------------------*/
XFE_END_CPLUSPLUS_PROTECTION

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

@ -1077,25 +1077,30 @@ WidgetStageOneEH(Widget w,
/* Tool tip shell access */
/* */
/*----------------------------------------------------------------------*/
static Widget _xfe_tt_shell = NULL;
/* extern */ Widget
_XfeToolTipGetShell(Widget w)
{
/* Create to global tool tip shell if needed */
if (!_xfe_tt_shell)
{
Widget aw = XfeAncestorFindApplicationShell(w);
static Widget _tool_tip_shell = NULL;
/* Create to global tool tip shell if needed */
if (!_tool_tip_shell)
{
/* Find the ancestor shell */
Widget aw = XfeAncestorFindShell(w);
assert( _XfeIsAlive(aw) );
_xfe_tt_shell = XfeCreateToolTipShell(aw,
TOOL_TIP_SHELL_NAME,
NULL,
0);
/* Create tool tip shell with the same visual, depth & cmap as aw */
_tool_tip_shell = XtVaCreateWidget(TOOL_TIP_SHELL_NAME,
xfeToolTipShellWidgetClass,
aw,
XmNvisual, XfeVisual(aw),
XmNcolormap, XfeColormap(aw),
XmNdepth, XfeDepth(aw),
NULL);
}
return _xfe_tt_shell;
return _tool_tip_shell;
}
/*----------------------------------------------------------------------*/
/* extern */ Widget