Give the window its own identity in Linux task bars

AWT names the X11 window class after the thread that first touched the
toolkit, so the client shared java-awt-EventDispatchThread with every other
Swing app. Set it to ts3j-client instead (the jar's manifest opens the AWT
internals this needs), and install a matching .desktop launcher and icon in
the user's data directory: without a launcher claiming the class, Plasma falls
back to the process's command line and files the window under Java.

The window icon is now offered at several sizes instead of 16 px only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-24 14:21:10 +00:00
parent f27cc40755
commit 03ea2c86c3
6 changed files with 176 additions and 2 deletions

View File

@@ -93,7 +93,7 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
this.hotkeys = new HotkeyService(new HotkeyActions(this), this::hotkeyArgumentChoices);
contacts.addListener(() -> SwingUtilities.invokeLater(this::contactsChanged));
setIconImage(Icons.app().getImage());
setIconImages(Icons.appImages());
// We tear the connections down ourselves on close, so don't let Swing kill the JVM.
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@@ -310,7 +310,7 @@ public final class MainFrame extends JFrame implements ServerTabPane.Listener {
/** Rebuilds the icon-bearing chrome after the active icon pack changed. */
private void rebuildIcons() {
setIconImage(Icons.app().getImage());
setIconImages(Icons.appImages());
menuBar = buildMenuBar();
setJMenuBar(menuBar);
remove(toolbar);