fix(window): match full app_id in KWin SSD script

The KWin script checked for resourceClass === "qbz" but on Wayland,
KWin sets resourceClass from the xdg-toplevel app_id, which is the
full GTK application ID: "com.blitzfc.qbz" (from tauri.conf.json
identifier). Now matches all three possible values: com.blitzfc.qbz,
qbz, qbz-nix. Added diagnostic print() for journalctl debugging.
This commit is contained in:
vicrodh committed 2026-02-23 04:40:11 -06:00
1 parent 55b4a5af13
commit 0c0eb48adc
1 file changed
+13 -9
+13 -9
View File
@@ -170,18 +170,22 @@ fn load_kwin_ssd_script() -> Result<(), String> {
use std::io::Write;
let script_content = r#"
const clients = workspace.windowList();
for (let i = 0; i < clients.length; i++) {
const c = clients[i];
if (c.resourceClass === "qbz") {
c.noBorder = false;
}
function isQbzWindow(client) {
var rc = client.resourceClass.toLowerCase();
return rc === "com.blitzfc.qbz" || rc === "qbz" || rc === "qbz-nix";
}
workspace.windowAdded.connect(function(client) {
if (client.resourceClass === "qbz") {
function forceDecorations(client) {
print("[QBZ-SSD] checking: resourceClass=" + client.resourceClass + " caption=" + client.caption);
if (isQbzWindow(client)) {
print("[QBZ-SSD] forcing SSD on: " + client.resourceClass);
client.noBorder = false;
}
});
}
var clients = workspace.windowList();
for (var i = 0; i < clients.length; i++) {
forceDecorations(clients[i]);
}
workspace.windowAdded.connect(forceDecorations);
"#;
// Write script to a temporary file