fix(linux): fix KWin script startup crash and embed type-2 ELF runtime in AppImage
This commit is contained in:
@@ -115,16 +115,14 @@ fn main() -> ExitCode {
|
||||
// costs — on a Wayland session, XWayland clients only.
|
||||
let (tx, rx) = std::sync::mpsc::channel();
|
||||
|
||||
let watcher_conn = blocker_platform_linux::watcher::serve(tx.clone()).ok();
|
||||
if watcher_conn.is_some() {
|
||||
println!("owning the D-Bus name {BUS_NAME}");
|
||||
}
|
||||
|
||||
if let Ok(backend) = blocker_platform_linux::kwin::KwinBackend::connect() {
|
||||
println!("backend: kwin — native Wayland windows are visible");
|
||||
let _keep_connection = match blocker_platform_linux::watcher::serve(tx) {
|
||||
Ok(c) => c,
|
||||
Err(e) => {
|
||||
eprintln!("blocker-daemon: cannot own {BUS_NAME}: {e}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
};
|
||||
println!("owning the D-Bus name; entering the event loop");
|
||||
let _keep_connection = watcher_conn;
|
||||
run_loop(&rx, &schedules, &usage, &context, blocker_platform_linux::Enforcement::Freeze);
|
||||
backend.shutdown();
|
||||
return ExitCode::SUCCESS;
|
||||
|
||||
@@ -126,9 +126,8 @@ workspace.windowActivated.connect(reportFocus);
|
||||
|
||||
// Report whatever is already focused, so the daemon starts with a correct state
|
||||
// instead of waiting for the user to alt-tab.
|
||||
for (var i = 0; i < workspace.windowList().length; i++) {
|
||||
var w = workspace.windowList()[i];
|
||||
if (w.active) { reportFocus(w); break; }
|
||||
if (workspace.activeWindow) {
|
||||
reportFocus(workspace.activeWindow);
|
||||
}
|
||||
"#;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user