RFR: 8315655: [macos] Right click and dragging over a component with a popup menu will open the popup [v4]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Fri Jun 7 07:26:17 UTC 2024
On Thu, 6 Jun 2024 18:41:16 GMT, Alisen Chung <achung at openjdk.org> wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/macosx/NSEvent.java line 276:
>>
>>> 274: && jeventType != MouseEvent.MOUSE_RELEASED) {
>>> 275: return false;
>>> 276: }
>>
>> Just to double check, are the only jeventTypes to trigger popups using mouse? Could there be other event types, maybe using keyboard for example with tab/arrows & enter?
>
> I believe only MouseEvents can be popup triggers. I checked in MouseEvent that there is a field for popup triggers and no such field in KeyEvent.
>
> The isPopupTrigger method here also previously checked button down masks already, so adding a check for the correct mouse events shouldn't be an issue even if there was a way to show a popup menu with a different event type.
looks good..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19569#discussion_r1630760813
More information about the client-libs-dev
mailing list