fix: default instance_name

This commit is contained in:
Aylur
2024-08-02 16:32:10 +02:00
parent a0680e3b88
commit 302536de15
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ class AstalJS extends Astal.Application {
})
if (!this.acquire_socket())
return client(msg => Astal.Application.send_message(this.instance_name, msg)!, ...programArgs)
return client(msg => Astal.Application.send_message(this.instanceName, msg)!, ...programArgs)
if (css)
this.apply_css(css, false)
+3 -3
View File
@@ -193,9 +193,6 @@ public class Application : Gtk.Application {
}
public new void quit() throws DBusError, IOError {
if (instance_name == null)
instance_name = "astal";
if (service != null) {
if (FileUtils.test(socket_path, GLib.FileTest.EXISTS)){
try {
@@ -210,6 +207,9 @@ public class Application : Gtk.Application {
}
construct {
if (instance_name == null)
instance_name = "astal";
shutdown.connect(() => { try { quit(); } catch(Error err) {} });
Unix.signal_add(1, () => { try { quit(); } catch(Error err) {} }, Priority.HIGH);
Unix.signal_add(2, () => { try { quit(); } catch(Error err) {} }, Priority.HIGH);