On Fri, 18 Dec 2020 00:18:22 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> Tejpal Rebari has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   changed mode of files
>
> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java
>  line 806:
> 
>> 804: 
>> 805: 
>> 806:             "PopupMenu.consumeEventOnClose", Boolean.FALSE,
> 
> This property was added to support some kind of "native" behavior.
> The code from the BasicPopupMenuUI.java:
> 
>                     // Ask UIManager about should we consume event that closes
>                     // popup. This made to match native apps behaviour.
>                     boolean consumeEvent =
>                         UIManager.getBoolean("PopupMenu.consumeEventOnClose");
>                     // Consume the event so that normal processing stops.
>                     if(consumeEvent && !(src instanceof MenuElement)) {
>                         me.consume();
>                     }
> So after this fix, the mouse event that causes the popup to close will be not 
> be dispatched to the next component?

Before the fix the mouse event that cause the popup to close  was consumed here 
as the "PopupMenu.consumeEventOnClose" was true.

After the fix the mouse event that cause the popup to close will not be 
consumed here as  "PopupMenu.consumeEventOnClose" is set to false in the fix 
for Windows, GTK, Nimbus and Motif LAF.

-------------

PR: https://git.openjdk.java.net/jdk/pull/600

Reply via email to