RFR: 8315655: [macos] Right click and dragging over a component with a popup menu will open the popup [v5]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Fri Jun 7 07:26:19 UTC 2024
On Thu, 6 Jun 2024 18:28:12 GMT, Alisen Chung <achung at openjdk.org> 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
More information about the client-libs-dev
mailing list