On Thu, 6 Jun 2024 18:28:12 GMT, Alisen Chung <[email protected]> wrote:
>> Issue is a mouse drag will trigger a popup in macos, but not in linux or
>> windows.
>> The solution is to add a check for a mouse pressed event to show popup and
>> prevent mouse entered events from triggering the popup
>
> Alisen Chung has updated the pull request incrementally with three additional
> commits since the last revision:
>
> - update copyright years
> - automated test
> - changed test to automatic
test/jdk/javax/swing/JPopupMenu/MouseDragPopupTest.java line 44:
> 42: */
> 43: public class MouseDragPopupTest {
> 44: static boolean failed;
volatile
test/jdk/javax/swing/JPopupMenu/MouseDragPopupTest.java line 48:
> 46: static JPanel panel;
> 47: static JPanel innerPanel;
> 48: static JPopupMenu menu;
guess these 2 can be local vars..
test/jdk/javax/swing/JPopupMenu/MouseDragPopupTest.java line 54:
> 52: public static void main(String[] args) throws Exception {
> 53: SwingUtilities.invokeAndWait(() -> {
> 54: createAndShowGUI();
normally after frame is created, we do robot.waitForIdle and robot.delay(1000)
before accessing the frame location or test other things..
test/jdk/javax/swing/JPopupMenu/MouseDragPopupTest.java line 83:
> 81:
> 82: if (failed) {
> 83: throw new RuntimeException("Popup was shown, Test Failed.");
frame needs to be disposed at end..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19569#discussion_r1630760974
PR Review Comment: https://git.openjdk.org/jdk/pull/19569#discussion_r1630762974
PR Review Comment: https://git.openjdk.org/jdk/pull/19569#discussion_r1630761930
PR Review Comment: https://git.openjdk.org/jdk/pull/19569#discussion_r1630763411