RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v3]

Sean Mullan mullan at openjdk.org
Mon Oct 28 14:51:50 UTC 2024


On Fri, 25 Oct 2024 18:52:24 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> @aivanov-jdk 
>> On macOS, popup is shifted up and does not cover the taskbar even without SM. 
>> 
>>> The updated test bug6694823.java works correctly on Windows and displays its popup over the Windows taskbar — it is expected.
>>> Popup menus in stand-alone apps have their always-on-top flag set to true, therefore they can be displayed on top of the taskbar.
>> 
>> On native applications (eg. Word), popup menus don't overlap taskbar when clicked close to taskbar so do we consider this as expected behavior or the way it works currently (overlaps the taskbar)?
>
> The pop is shifted up on macOS because `LWCToolkit` returns `false` in `canPopupOverlapTaskBar`:
> 
> https://github.com/openjdk/jdk/blob/36d71735e3554264e8d17f7e0e72999ac639e398/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java#L900-L902
> 
> On Windows, apps can control the area where they want a popmenu display or exclude an area of the screen. At the same time, Firefox displays its right-click menu over the taskbar if the menu fits when dropped down. A native Win32 app with a menu bar displays popup menus over the taskbar if it fits on the screen; some menus could open upwards if their items don't fit on the screen to display downwards (I attached a screenshot to JBS). Popup menus in Win32 Notepad (the version in Windows 10) displays it's right-click menu over the taskbar if it fits.
> 
> At the same time, right-click menu of a window title never displays over the taskbar, the menu opens upward if it doesn't fit without covering part of the taskbar.
> 
> I'm pretty sure the default return value of `true` from `SunToolkit.canPopupOverlapTaskBar` isn't something that was chosen accidentally.
> 
> Windows applications may avoid showing popup over the taskbar (confining the popups inside the work area, see [`SystemParametersInfoW`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfow) and `SPI_GETWORKAREA`). We can change the behaviour of the JDK.
> 
> Yet the failure of `bug6694823.java` without the security manager isn't a product bug in my opinion.

Fixed in https://github.com/openjdk/jdk/pull/21498/commits/aca9555a0b697bd9829224396a5448c88057009d

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21498#discussion_r1819180850


More information about the nio-dev mailing list