On Thu, 30 Jul 2026 11:09:00 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> Aqua classes for text components enables dragEnabled by default although 
> setDragEnabled spec cites `"The default value of the dragEnabled property is 
> false. "` and there is nothing in Aqua L&F that mentions otherwise as to why 
> the default is overridden.
> Other L&F dont override the mode and the code is there from macosx port days 
> so it seems to be an oversight.
> 
> The code is deleted.
> Test is added to check 
>  - default value is honoured in all installed L&Fs
>  - explicit application setting of drag mode is preserved on L&F change
> 
>  CI testing is ok.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I tested this with a small native app, NSTextView works the same way as Aqua, 
drag of the selected text is enabled by default. So I think it is better to 
leave the default behavior as is. Possibly we can mention one more time in the 
spec that this behavior is L&F dependent, and/or support a proper way for the 
app to override the property, or just do nothing since it worked like this for 
years.

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

PR Comment: https://git.openjdk.org/jdk/pull/32101#issuecomment-5138077144

Reply via email to