Skip to content

Commit 10d89ac

Browse files
committed
Point StartupWMClass at the class the window actually has
No window ever had the class compose-window. The literal appears nowhere in the desktop classpath -- not in Compose, not in skiko, not in the app -- and AWT derives WM_CLASS from the main class, so every window reports com-inspiredandroid-braincup-MainKt instead. Confirmed against an installed braincup-bin launched under Hyprland. Both arches ship identical jars, so this was failing everywhere a taskbar matches a window back to its launcher, and the Flatpak entry carried the same stale value.
1 parent 64d5f8b commit 10d89ac

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎aur/PKGBUILD‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ package() {
3737
exec /opt/braincup/bin/Braincup "$@"
3838
EOF
3939

40-
# Install desktop entry
40+
# Install desktop entry. StartupWMClass has to be the window class AWT
41+
# actually sets, which it derives from the main class -- so it tracks
42+
# mainClass in composeApp/build.gradle.kts, dots turned into dashes.
4143
install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/braincup.desktop" << EOF
4244
[Desktop Entry]
4345
Name=Braincup
@@ -47,7 +49,7 @@ Icon=braincup
4749
Type=Application
4850
Categories=Game;Education;
4951
Keywords=Math;Memory;Focus;Brain;Training;Game;
50-
StartupWMClass=compose-window
52+
StartupWMClass=com-inspiredandroid-braincup-MainKt
5153
Terminal=false
5254
EOF
5355

‎flatpak/io.github.simonschubert.Braincup.desktop‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ Icon=io.github.simonschubert.Braincup
66
Type=Application
77
Categories=Game;Education;
88
Keywords=Math;Memory;Focus;Brain;Training;Game;
9-
StartupWMClass=compose-window
9+
StartupWMClass=com-inspiredandroid-braincup-MainKt
1010
Terminal=false

0 commit comments

Comments
 (0)