Bug 123027 - popup menus fail on Tarantella/VNC
popup menus fail on Tarantella/VNC
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: openmotif (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Thomas Woerner
Depends On:
Blocks: 116727
  Show dependency treegraph
Reported: 2004-05-11 10:36 EDT by Alastair McKinstry
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-08 12:05:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to MenuDiff.c (1.05 KB, patch)
2004-05-11 10:38 EDT, Alastair McKinstry
no flags Details | Diff

  None (edit)
Description Alastair McKinstry 2004-05-11 10:36:10 EDT
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):

How reproducible:

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

Additional info:

Works with HP Motif code; patch applied works on VNC and Tarantella.
Comment 1 Alastair McKinstry 2004-05-11 10:38:48 EDT
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.
Comment 2 Alastair McKinstry 2004-05-11 10:56:39 EDT
Please Add me to CC list:
Alastair.McKinstry@oracle.com (This is an Oracle bug, not a Debian one).
Comment 3 Ngo Than 2004-05-11 12:55:18 EDT
you have selected the wrong component. I assigned it to correct
component openmotif
Comment 4 Suzanne Hillman 2004-05-12 17:30:10 EDT
Alastair - you need to have an account for that address in order to
add it. You appear not to.
Comment 15 Jay Turner 2004-09-01 22:21:38 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.