On Thu, 15 Feb 2024 01:41:49 GMT, Sergey Bylokhov <[email protected]> wrote:
>> There is an issue displaying the xembed icons in the appIndicators area >> which are not displayed correctly with certain Gnome Shell versions. >> It was already fixed >> [externally](https://gitlab.gnome.org/3v1n0/gnome-shell/-/commit/20a81d786697f40880e81d867453b1bad9524ec1). >> >> However this is still a blocker on systems that have not received this fix, >> so this fix disables a SystemTray's support for Gnome Shell < 45 versions. >> >> Gnome Shell version detection has the following logic: >> * execute `/usr/bin/gnome-shell --version` >> * parse its output to extract the major version >> * disable the SystemTray support if the version < 45 or parsing failed for >> some reason >> >> >> The numbering convention changed with the introduction of Gnome Shell 40. >> The old numbering convention is also handled correctly(e.g. [3.38.1] >> (https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/d15f6c75b19be1e32ec24165f09b3e74afaf7395/NEWS#L1134) >> ) >> >> This is a simplified fix to make it easier to backport it. >> The improved solution will be to [receive the ShellVersion property via the >> DBUS >> API](https://unix.stackexchange.com/questions/73212/how-to-get-the-gnome-version/73225#73225) >> >> Testing looks good: >> Oracle Linux 7.9, Gnome Shell 3.28.3 >> Ubuntu 22.04, Gnome Shell 42.9 >> Ubuntu 23.04, Gnome Shell 44.3 >> Ubuntu 23.10, Gnome Shell 45.0 >> Fedora 38, Gnome Shell 44.0 > > src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java line 286: > >> 284: try { >> 285: Process process = >> 286: new ProcessBuilder("/usr/bin/gnome-shell", "--version") > > How it will affect performance? Well, clearly the exec will take some non-zero time, but this part of initialising the SystemTray only happens once and (arm-waving alert) 99% of apps don't do it at all, so I don't see it as a major problem and it needs to be done. There's a plan to re-do it with an API call later but that is more complex code than we have time for now, so it will be fine as a temporary solution. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17860#discussion_r1490276297
