Red Hat Bugzilla – Bug 123027
popup menus fail on Tarantella/VNC
Last modified: 2007-11-30 17:07:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131
Description of problem:
In certain circumstances, popup menus fail when used on
Tarantella and VNC displays. This is seen in Oracle apps
(Oracle bug 3252085).
The problem occurs within _XmGrabPointer(), in motif/lib/Xm/MenuUtil.c
The code calls XGrabPointer() in a retry loop. This fails as
the time is before the Grab time on VNC and Tarantella. Unfortunately
it calls with the same parameters the next 5 times, so it always fails.
_XmGrabPointer() is called within several layers of motif code from
our TK layer, when posting the Motif Popup menu. It failing causes
_XmMenuGrabKeyboardAndPointer() to fail, leading to focus being
redirected away from the popup menu, and hence the wrong widgets get
the events destined for the popup.
The fix is to detect when XGrabPointer() fails, and change time to
CurrentTime (== 0). This appears to have no implications to other code.
Analysis of the calls at the VNC server end shows that this is is what
the HP Motif code does: its first call at this point uses the value of
time passed from above, and fails, its second uses CurrentTime, which
This fix has been tested in VNC and Tarantella.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Popup menu on a custom widget in Motif (not menu popup)
2. DISPLAY on a VNC or tarantella display
3. trace _XmMenuGrabKeyboardAndPointer(). It fails due to
Actual Results: =effects depend on test: typically focus is no
longer on popup menu as required
Expected Results: It succeeds as on standard X display
Works with HP Motif code; patch applied works on VNC and Tarantella.
Created attachment 100149 [details]
Patch to MenuDiff.c
Patch reproduces fixed effects seen on HP: Ran the Oracle code with the problem
on HP (ie using HP Motif libraries) and monitored calls to a debug VNC server.
Saw the HP version try XGrabPointer() with the time passed in from the popup
event, fail, and then retry XGrabPointer with time = 0 (== CurrentTime), and
the program succeeded.
Please Add me to CC list:
Alastair.McKinstry@oracle.com (This is an Oracle bug, not a Debian one).
you have selected the wrong component. I assigned it to correct
Alastair - you need to have an account for that address in order to
add it. You appear not to.
Please have a look at
This version will be in U3.
An errata has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.