RFR: 8322750: Test "api/java_awt/interactive/SystemTrayTests.html" failed because A blue ball icon is added outside of the system tray [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Feb 15 13:05:04 UTC 2024


On Thu, 15 Feb 2024 12:43:04 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java line 94:
>> 
>>> 92:             return;
>>> 93:         }
>>> 94: 
>> 
>> What about `getTrayIconSize`?  Should we allow to return TRAY_ICON_HEIGHT/TRAY_ICON_WIDTH if disable system tray is on?
>
> In the unsupported case, you don't have an instance to call this method.
> 
> https://github.com/openjdk/jdk/blob/a0e5e16afbd19f6396f0af2cba954225a357eca8/src/java.desktop/share/classes/java/awt/SystemTray.java#L179-182

But here the question is about `getTrayIconSize`  for "disabling system tray" [i.e. should we do 

if (shouldDisableSystemTray) {
            return;
        }


and as I understand we are disabling it even though it can be supported (ie `isSupported `returns true) before version <45, no?

Else I guess the right place to call `shouldDisableSystemTray` should be in `isSupported` and if `shouldDisableSystemTray` returns true, isSupported should also return false?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17860#discussion_r1490974706


More information about the client-libs-dev mailing list