JDK-4691190 : JCK1.4/1.3a, interactive:api/javax_swing/interactive/JMenuItemTests.html fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86
  • Submitted: 2002-05-24
  • Updated: 2008-05-21
Related Reports
Relates :  
Relates :  
Description
Name: icR10030			Date: 05/24/2002



This failure was also seen in 4546712,
see last evaluation from 4546712:

"Name: dmR10075                  Date: 05/21/2002


The bug is reproducible with b11 on Sawfish WM (Linux) with point-to-focus focus policy, 
with 'enter-exit' sub-option. This option is WM specific and user settings specific - 
the user can instead set 'enter-only' sub-option (which is equivalent to how other WMs
implement point-to-focus). 'enter-only' mode is still point-to-focus and bug is not 
reproducible in this mode. So, the problem is too specific and it is questionable
should we support this or not.
After discussing this issue with Igor Chebykin(###@###.###) we decided to file
a new bug for Mantis for this issue and leave 4546712 intact. We will try (if at all
possible) to fix this issue in Mantis.
###@###.### 2002-05-21"

Filed By       : J2SE-SQA [###@###.###
JDK            : jdk1.4.1-b12, jre1.4.1-b12
JCK            : JCK1.4-b17
Platform[s]    : RedHat Linux 7.2
switch/Mode    : -client -Xmixed
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Failing Test   : api/javax_swing/interactive/JMenuItemTests.html#JMenuItem [JMenuItemTest0003]

Test source location:
=====================
/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14/tests/api/javax_swing/interactive/JMenuItemTests.java

jtr file location:
==================
/net/jtgb4u4c.eng/export/sail15/results/hopper/b12/jck14/linux/redhat7.2_gnome_client_linux-13/workDir/api-interactive/javax_swing/interactive/JMenuItemTests_JMenuItem.jtr

How to reproduce:
=================
0. Set focus policy to "follow mouse" ("enter-exit" in Sawfish window manager)
1. Run the following script (you may need to change JCK and JAVA_HOME paths)
2. Shrink test frame to make menu to ovrlap the frame when menu is opened
3. Press Alt+m to open menu
4. Place mouse pointer over any of menu's items 
5. Press 1
6. Press Esc.

You will see that menu does not respond to keyboard.

--------Script START---------------------
#!/bin/sh

JCK=/net/jdk/export/disk8/local.java/jck1.4/JCK-runtime-14
export JCK
CLASSPATH="${JCK}/classes:${JCK}/javatest.jar"
export CLASSPATH
JAVA_HOME=/net/jdk/export/disk8/local.java/jdk1.4/linux-i386
export JAVA_HOME

$JAVA_HOME/bin/java -showversion -Xfuture          javasoft.sqe.tests.api.javax.swing.interactive.JMenuItem.JMenuItemTests          -TestCaseID JMenuItemTest0003          -TestDirURL file:///$JCK/tests/api/javax_swing/interactive/JMenuItemTests.html#JMenuItem

--------Script END----------------------

Test output:
============
JMenuItemTest0003: Failed. JMenuItem setMnemonic() does not behave as expected.

Specific Machine Info:
======================
Hostname: linux-13
Os: Redhat7.2


======================================================================

Comments
SUGGESTED FIX One of the possible solutions would be to make synthetic focus events for Windows on Solaris/Linux(only for Window - not for Frame or Dialog). Along with that, we can make all the Windows non-focusable on native level. This will give us 100% correct information about opposite in WINDOW_LOST_FOCUS and WINDOW_DEACTIVATED events and we might be able to use it to distinguish between focus leaving application and focus switch from Frame to child Window(like menu). Moreover, it will allow us to make Swing popups focusable so it will fix the problems users report to us as backward incompatibilities. ###@###.### 2002-12-12
12-12-2002

EVALUATION Commit to fix in mantis (JCK) ###@###.### 2002-05-24 After investigation and discussion with the focus team, they felt that if it were possible to fix this, it would be a lot of code, and fairly risky. It probably isn't worth the risk at this point in Mantis: this is not a regression, and it only occurs when using a nonstandard option on one window manager. When discussing this at the client project meeting, I was reminded that since this issue exists in Merlin, a fix is not required for Mantis. ###@###.### 2002-11-19
19-11-2002