|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1697 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 1697.
Report 1697 Actions
Problem Report Number 1697 Submitter's Classification Specification problem State Resolved Resolution Minor System Fault (MSF) Problem Resolution ID MSF.X.0070 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1998-04-15 08:00 Expiry Date null Product Standard Window System Application Interface V2 Certification Program The Open Brand certification program Test Suite VSW version 5.0.0 Test Identification Xt9/XtGrabButton 3 Problem Summary MSF4W.00010 A test failure due to a non-alignment between the reference code and its specification prior to X11R6.4. Problem Text
The reference implementation (i.e. The X11 code provided by TOG) being
tested is not in line with the standard specification for this X11
function as defined in the "X Toolkit Intrinsics - C Language
Interface".
The assertion being tested is in line with the standard specification
but the behavior of this function is not in line with the specification.
Either the X11 reference implementation is at fault, or the
Specification needs to be aligned with the reference implemenation. It
is our understanding that X11R6.1 is no longer supported by TOG,
hence we request this waiver be granted a Permanent Interpretation.
Section 7.2.1 of the "X Toolkit Intrinsics - C Language Interface"
states:
XtGrabButton calls XGrabButton specifying the widget's window as
the grab window if the widget is realized. The remaining arguments
are the exactly as for XGrabButton. If the widget is not
realized, or is later unrealized, the call to XGrabButton is
performed (again) when the widget is realized and its window
becomes mapped.
The reference implementation is written so that a grab is only done
once. That is, if a widget is already realized when XtGrabButton()
is called then a grab is made. If a widget is not realized
when the call to XtGrabButton() is made then a realize event handler
is installed so that when the widget is realized the realize
event handler can perform the grab. But the handler will uninstall
itself when it is called. Thus, in either case a grab is only
performed after the widget is realized for the first time.
This is not consistent with the documentation which states that
after a call to XtGrabButton() is made a widget can be unrealized
and then realized again and still have the grab take place.
-------------------------------------------------------------
FILE: $TET_ROOT/vsw5/tset/Xt9/tgrabbutn/Test.c
static void t003(){
.
.
.
labelw_msg = (Widget) CreateLabelWidget(msg, boxw1);
.
.
.
XtRealizeWidget(topLevel);
.
.
.
/*
* SINCE THE WIDGET IS ALREADY REALIZED THE CODE FOR
* XtGrabButton() DOES NOT INSTALL A REALIZE EVENT
* HANDLER.
*/
XtGrabButton(labelw_msg, AnyButton, AnyModifier, True,
ButtonPressMask|ButtonReleaseMask, GrabModeAsync,
GrabModeAsync, XtWindow(labelw_msg), None);
.
.
.
/*
* UNREALIZE THE WIDGET.
*/
XtUnrealizeWidget(labelw_msg);
.
.
.
/*
* WIDGET IS REALIZED BUT NO GRAB IS PERFORMED BECAUSE
* THE XtGrabButton() CODE DOES NOT HAVE A REALIZE EVENT
* HANDLER INSTALLED TO PERFORM THE GRAB.
*/
XtRealizeWidget(labelw_msg);
.
.
.
}
-------------------------------------------------------------
FILE: Xt/PassivGrab.c
void XtGrabButton(widget, button, modifiers, owner_events,
event_mask, pointer_mode, keyboard_mode,
confine_to, cursor)
Widget widget;
int button;
Modifiers modifiers;
Boolean owner_events;
unsigned int event_mask;
int pointer_mode;
int keyboard_mode;
Window confine_to;
Cursor cursor;
{
WIDGET_TO_APPCON(widget);
LOCK_APP(app);
GrabKeyOrButton(widget, (KeyCode)button, modifiers, owner_events,
pointer_mode, keyboard_mode,
(Mask)event_mask, confine_to, cursor, POINTER);
UNLOCK_APP(app);
}
-------------------------------------------------------------
FILE: Xt/PassivGrab.c
void GrabKeyOrButton (widget, keyOrButton, modifiers, owner_events,
pointer_mode, keyboard_mode, event_mask,
confine_to, cursor, isKeyboard)
Widget widget;
KeyCode keyOrButton;
Modifiers modifiers;
Boolean owner_events;
int pointer_mode;
int keyboard_mode;
Mask event_mask;
Window confine_to;
Cursor cursor;
Boolean isKeyboard;
{
XtServerGrabPtr *passiveListPtr;
XtServerGrabPtr newGrab;
XtPerWidgetInput pwi;
XtPerDisplayInput pdi;
.
.
.
newGrab = CreateGrab(widget, owner_events, modifiers,
keyOrButton, pointer_mode, keyboard_mode,
event_mask, confine_to, cursor, False);
/*
* if the widget is realized then process the entry into the grab
* list. else if the list is empty (i.e. first time) then add the
* event handler. then add the raw entry to the list for processing
* in the handler at realize time.
*/
if (XtIsRealized(widget)) /* Realized widgets call MakeGrab */
/*
* NOTICE THAT IF THE WIDGET IS ALREADY REALIZED WHEN
* XtGrabButton() IS CALLED THAT NO REALIZE EVENT HANDLER
* IS INSTALLED. THEREFORE, IF WE UNREALIZE AND REALIZE
* THE WIDGET AGAIN THERE WILL BE NO REALIZE EVENT HANDLER
* TO PERFORM THE GRAB. ALSO NOTICE THAT THE "ELSE" PART
* OF THIS "IF" WILL INSTALL A REALIZE EVENT HANDLER SO
* THAT WHEN THE WIDGET IS REALIZED THEN THE EVENT HANDLER
* CAN ISSUE A GRAB. THIS CODE DOES NOT ALLOW FOR MULTIPLE
* REALIZE/UNREALIZE CALLS. THIS IS NOT CONSISTENT WITH
* THE DOCUMENTATION.
*/
MakeGrab(newGrab, passiveListPtr, isKeyboard, pdi, pwi);
else { /* Non-realized widgets add realize event handler */
if (!pwi->realize_handler_added)
{
XtAddEventHandler(widget, StructureNotifyMask, FALSE,
RealizeHandler,
(XtPointer)pwi);
pwi->realize_handler_added = TRUE;
}
.
.
.
}
.
.
.
}
-------------------------------------------------------------
FILE: Xt/PassivGrab.c
static void RealizeHandler (widget, closure, event, cont)
Widget widget;
XtPointer closure;
XEvent *event; /* unused */
Boolean *cont; /* unused */
{
XtPerWidgetInput pwi = (XtPerWidgetInput)closure;
XtPerDisplayInput pdi;
LOCK_PROCESS;
pdi = _XtGetPerDisplayInput(XtDisplay(widget));
UNLOCK_PROCESS;
MakeGrabs(&pwi->keyList, KEYBOARD, pdi);
MakeGrabs(&pwi->ptrList, POINTER, pdi);
/*
* NOTICE THAT THE EVENT HANDLER IS REMOVED AFTER IT IS
* CALLED. HENCE, THE CODE ONLY ALLOWS FOR A GRAB TO
* TAKE PLACE AFTER AN UNREALIZED WIDGET BECOMES REALIZED
* FOR THE FIRST TIME. IF A WIDGET IS UNREALIZED AND
* REALIZED AGAIN THE GRAB WILL NOT TAKE PLACE AGAIN
* BECAUSE THIS HANDLER IS REMOVED.
*/
XtRemoveEventHandler(widget, XtAllEvents, True,
RealizeHandler, (XtPointer)pwi);
pwi->realize_handler_added = FALSE;
}Test Output
520|1 3 7505 1 1|VSW5TESTSUITE PURPOSE 3
520|1 3 7505 1 2|Assertion XtGrabButton-3.(A)
520|1 3 7505 1 3|When the widget widget is realized a successful call to
520|1 3 7505 1 4|void XtGrabButton(widget, button, modifiers, owner_events,
520|1 3 7505 1 5|event_mask, pointer_mode, keyboard_mode, confine_to, cursor)
520|1 3 7505 1 6|shall cause XGrabButton to be called, to establish a passive
520|1 3 7505 1 7|button grab for the specified widget, when the widget is
520|1 3 7505 1 8|next realized following an unrealize action on the widget.
520|1 3 7660 1 1|PREP: Initialize toolkit, Open display and Create topLevel root
widget
520|1 3 7660 1 2|PREP: Set up the XtToolkitError handler
520|1 3 7660 1 3|PREP: Set up widget tree of depth eight (8) return panedw
widget
520|1 3 7660 1 4|PREP: Create boxw1 widget in panedw widget
520|1 3 7660 1 5|PREP: Get the label widget name
520|1 3 7660 1 6|PREP: Create boxw2 widget in panedw widget
520|1 3 7660 1 7|PREP: Set height and width of boxw2 widget
520|1 3 7660 1 8|PREP: Create windows for widgets and map them
520|1 3 7660 1 9|PREP: Issue XtGrabButton
520|1 3 7660 1 10|PREP: Unrealize grab widget
520|1 3 7660 1 11|PREP: Realize grab widget
520|1 3 7660 1 11|PREP: Realize grab widget
520|1 3 7660 1 12|PREP: Move inside of grab widget
520|1 3 7660 1 13|PREP: Depress button
520|1 3 7660 1 14|PREP: Move outside of grab widget
520|1 3 7660 1 15|PREP: Release button
520|1 3 7660 1 16|ERROR: Timed out waiting for input
220|1 3 2 10:30:50|UNRESOLVED
410|1 3 1 10:30:50|IC EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
A Minor System Fault waiver is recommended.
Open Group procedures specify that when there is a version of the
reference code available from The Open Group that aligns with the
specification for a reported defect that an MSF is issued. This
failure is an XPT defect which is corrected in X11R6.4.
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 1697
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority