|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2131 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2131.
Report 2131 Actions
Problem Report Number 2131 Submitter's Classification Minor System Fault State Resolved Resolution Minor System Fault (MSF) Problem Resolution ID MSF.X.0089 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Expiry Date 1998-05-28 Product Standard Motif Toolkit Certification Program The Open Brand certification program Test Suite VSM version 4.0.0 Test Identification funcs/XmGetMenuCursor 1 Problem Summary MSF4M.00001 Minor fault in the system being tested. XmGetMenuCursor function returned value is not the same as what spec says. In the test case Initialize() function, it creates the display and then call toplevel... Problem Text
Minor fault in the system being tested.
XmGetMenuCursor function returned value is not the same as what
spec says.
In the test case Initialize() function, it creates the display and
then call
toplevel = XtAppCreateShell(name, "genericclass",
applicationShellWidgetClass, display, NULL, 0);
to create a toplevel shell, this shell belongs to xmApplicationShellWidget
class, and the above code creates a menu cursor.
The calling stack for XtAppCreateShell is:
--> XtAppCreateShell
--> XtCreateWidget /* Xt lib Create.c */
--> _XtCreate /* Xt lib Create.c */
--> CallInitialize /* Xt lib Create.c */
--> InitializePrehook /* Xm lib VendorS.c */
--> SecondaryObjectCreate /* Xm lib VendorS.c */
--> GetShellDesktopParent /* Xm lib VendorS.c */
--> XmGetXmScreen /* Xm lib Screen.c */
To test the above calling sequence, just put printf in those functions.
In XmGetXmScreen function, system will create a menu cursor for the
screen if there is no one yet, in VSM4, this screen is :0.0 . The menu cursor
of this screen here will be returned by XmGetMenuCursor functional call.
X/Open Waiver Reference: MSF4M.00001 Page: 1
WAIVER DOCUMENT X/Open Waiver Reference: MSF4M.00001
Here is the code of function XmGetMenuCursor:
/***************************************************************************/
Cursor
#ifdef _NO_PROTO
XmGetMenuCursor( display )
Display *display ;
#else
XmGetMenuCursor(
Display *display )
#endif /* _NO_PROTO */
{
XmScreen xmScreen;
/* get the default screen menuCursor since there is no
other information available to this function */
xmScreen = (XmScreen) XmGetXmScreen(DefaultScreenOfDisplay(display));
return(xmScreen->screen.menuCursor);
}
/**************************************************************************/
From above code you can see, if xmScreen->screen.menuCursor is not
NULL, then we will get a non-NULL cursor returned. If you look at XmGetXmScreen
function's code, you will find out that if this is the first time you call
it, XmGetXmScreen will always create an widget instance of xmScreenClass class
as long as the display is not NULL(which is true in test case).
Here is the code for XmGetXmScreen function:
/*************************************************************************/
/* ARGSUSED */
Widget
#ifdef _NO_PROTO
XmGetXmScreen( screen )
Screen *screen ;
#else
XmGetXmScreen(
Screen *screen )
#endif /* _NO_PROTO */
{
XmDisplay xmDisplay;
WidgetList children;
int num_children;
Arg args[5];
int i;
Screen *scr;
char name[25];
if ((xmDisplay = (XmDisplay) XmGetXmDisplay(DisplayOfScreen(screen))) == NUL
L)
{
X/Open Waiver Reference: MSF4M.00001 Page: 2
WAIVER DOCUMENT X/Open Waiver Reference: MSF4M.00001
_XmWarning(NULL, MESSAGE2);
return(NULL);
}
children = xmDisplay->composite.children;
num_children = xmDisplay->composite.num_children;
for (i=0; i < num_children; i++)
{
Widget child = children[i];
if ((XmIsScreen(child)) &&
(screen == XtScreen(child)))
return(child);
}
/* Not found; have to do an implied creation */
for (scr = ScreenOfDisplay(XtDisplay(xmDisplay), i);
i < ScreenCount(XtDisplay(xmDisplay));
i++, scr = ScreenOfDisplay(XtDisplay(xmDisplay), i))
{
if (scr == screen)
break;
}
sprintf(name, "screen%d", i);
i = 0;
XtSetArg(args[i], XmNscreen, screen); i++;
return(XtCreateWidget(name, xmScreenClass, (Widget)xmDisplay,
args, i));
}
/************************************************************************/
If you look at the XmScreenPart in ScreenP.h, there is a resource:
"Cursor menuCursor;"
And here is the XmScreenRec in ScreenP.h also:
typedef struct _XmScreenRec{
CorePart core;
XmDesktopPart desktop;
XmScreenPart screen;
}XmScreenRec;
The default value for XmNmenuCursor is defined in Xm Screen.c also,
The default resources for xmScreenClass is defined in Xm Screen.c.
this is the value test case returned. Here it is:
{
XmNmenuCursor, XmCCursor, XmRCursor,
sizeof(Cursor), Offset(screen.menuCursor),
XmRString, "arrow",
X/Open Waiver Reference: MSF4M.00001 Page: 3
WAIVER DOCUMENT X/Open Waiver Reference: MSF4M.00001
}
The conclusion here is: if we opened a display and call XmGetMenuCusor
function, we will get a "arrow" cursor if the client has not created his own
menu cursor yet, this function call will never return a NULL cursor.Review Information
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Minor System Fault (MSF) Review Conclusion
A Temporary Waiver is granted.
Problem Reporting System Options:
- View Report 2131
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority