Bug 123027 - popup menus fail on Tarantella/VNC
Summary: popup menus fail on Tarantella/VNC
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: openmotif
Version: 3.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 116727
TreeView+ depends on / blocked
 
Reported: 2004-05-11 14:36 UTC by Alastair McKinstry
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-08 16:05:29 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:243 0 normal SHIPPED_LIVE Updated OpenMotif packages fix several bugs 2004-09-01 04:00:00 UTC
Red Hat Product Errata RHBA-2004:298 0 normal SHIPPED_LIVE Updated openmotif packages 2004-08-18 04:00:00 UTC

Description Alastair McKinstry 2004-05-11 14:36:10 UTC
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
succeeds. 

This fix has been tested in VNC and Tarantella. 


Version-Release number of selected component (if applicable):


How reproducible:
Always

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
InvalidGrabTime; 

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 14:38:48 UTC
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 14:56:39 UTC
Please Add me to CC list:
Alastair.McKinstry (This is an Oracle bug, not a Debian one).


Comment 3 Than Ngo 2004-05-11 16:55:18 UTC
you have selected the wrong component. I assigned it to correct
component openmotif

Comment 4 Suzanne Hillman 2004-05-12 21:30:10 UTC
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-02 02:21:38 UTC
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.

http://rhn.redhat.com/errata/RHBA-2004-243.html



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