dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

17 lines892 bytesDiff
1diff --color -ruN a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp
2--- a/xembed-sni-proxy/sniproxy.cpp 2026-10-04 00:25:26.299757174 +0200
3+++ b/xembed-sni-proxy/sniproxy.cpp 2026-10-04 00:25:26.319273269 +0200
4@@ -525,6 +525,13 @@
5 const auto title = Title();
6 // we always need /some/ ID so if no window title exists, just use the winId.
7 if (title.isEmpty()) {
8+ // Prefer the window class: unlike the winId it is the same on every launch,
9+ // so trays can match on it (Wine leaves the title of its tray windows empty).
10+ const KWindowInfo window(m_windowId, NET::Properties(), NET::WM2WindowClass);
11+ const QByteArray windowClass = window.windowClassClass();
12+ if (!windowClass.isEmpty()) {
13+ return QString::fromUtf8(windowClass);
14+ }
15 return QString::number(m_windowId);
16 }
17 return title;