JDK-8160270 : dual-screen issue with java.awt.Choice
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-06-24
  • Updated: 2017-04-06
  • Resolved: 2017-03-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b163Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Run the old test 
java/awt/Choice/PopdownGeneratesMouseEvents/
on a dual-screen system. I have horizontal layout and the second monitor bigger than first.
This appletviewer test puts the test frame for some reason on the second screen: it may be a peculiarity of handling the virtual screens by appletviewer -- and then Robot clicks on the Choice. Choice opens but on the wrong (first) screen.


RULE "java/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents" Exception java.lang.RuntimeException: Test failed. Exception thrown: java.lang.RuntimeException: Choice wasn't opened with LEFTMOUSE button

Comments
Review completed, READY TO PUSH: http://mail.openjdk.java.net/pipermail/awt-dev/2017-March/012698.html
16-03-2017

3/16/2017: The fix is on review: http://mail.openjdk.java.net/pipermail/awt-dev/2017-March/012696.html http://cr.openjdk.java.net/~serb/8160270/webrev.00
16-03-2017

Review: http://mail.openjdk.java.net/pipermail/awt-dev/2017-March/012696.html
16-03-2017

9-critical-request: - Justification: In the multiscreen environment the the normal menu in MenuBar, the popup menus, and popups in the Choice use incorrect screen. ���- Risk Analysis:��� minimal. - Testing (done/to-be-done) : awt and the swing tests on linux were run. - Back ports (done/to-be-done) : no backports, because this regression in jdk9. - Fix For Release: JDK9
15-03-2017

9-critical-watch: P2 issue previously (before ZBB) masked by formally passed automatic test. The issue is reproducible on a dual-screen system - horizontal layout on the second monitor bigger than first, as a wrong result the Choice opens but on the wrong (first) screen.
09-03-2017

3/8/2017: The bug is still on investigation phase to prepare a fix
09-03-2017

The test still fails with jdk9 b159 promoted build but does pass with homemade build of jdk9/client repository. Note, however, that in latter case the original applet frame goes to the 1st screen regardless of the console location. If we add some delay just after setVisible(true) for the frame and move it quickly to another screen, popdown will still open on the first one, and in the same wrong place as with b159 and before. Thus, the bug is still here even if formally the automatic test does pass.
06-03-2017

Prem , please re-evaluate
03-03-2017

I don't know if it is a duplicate of JDK-8163101 or not but it is still reproducible on my machine with jdk9 b155. I start jtreg from a console on the first screen which is 1280x1024 and logically to the left. For some reason a frame with Choice is shown on the second monitor which is 1920x1080 and to the right. The automatic test still opens the dropdown on the first, smaller screen, far away from the original frame and close to the right edge of that smaller left screen.
03-03-2017

Sorry Ajit, I didn't understand. It seems to me that we have 3 kinds of tests: especially designed for multiple screens; created without any regard to the number of them; especially designed for a single-monitor setup. Of these, I don't remember a test of the 3-rd kind but there may be one, manual maybe, I just don't know. Most of them are screen number-agnostic and as such, may run on dual-screen -- and as we see, yield sometimes an interesting result.
01-07-2016

My question was more of affirming whether tests are designed for running on dual screen or not? It is reproducible on both Ubuntu 16.04 & 14.04 and needs to be fixed.
01-07-2016

All the above mentioned tests failed on Dual screen systems on Ubuntu 14.04 x64 machine with 9b124 build. All these tests pass with Single monitor. This makes me wonder whether these tests should be run on dual screen or not?
01-07-2016

16.04, and sure they should. Or did you ask "should people run java on dual screen or not"?
01-07-2016