[gnome-boxes/run-in-bg-only-for-flatpak: 2/2] app: Keep running for run-in-bg VMs only in Flatpak
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-boxes/run-in-bg-only-for-flatpak: 2/2] app: Keep running for run-in-bg VMs only in Flatpak
- Date: Mon, 28 Jun 2021 09:30:26 +0000 (UTC)
commit f6c365d639a66513112a152c10cadc3e766a369f
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Jun 23 16:39:40 2021 +0200
    app: Keep running for run-in-bg VMs only in Flatpak
    
    The changes introduced in commit 181d3035 are only useful for Flatpak
    builds, when libvirt/qemu are bundled within Boxes and therefore their
    life cycle is tied to the main Boxes process.
    
    In classic (bare metal) deployments, libvirt runs as a daemon
    independently from the Boxes process, and therefore Boxes should
    exit gracefully when its windows are closed.
    
    Fixes #771
 src/app.vala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 4485f6dc..ce8b49b6 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -526,7 +526,7 @@ yield foreach_filename_from_dir (dir, (filename) => {
         }
     }
 
-    private void keep_vm_running_in_background (LibvirtMachine machine) {
+    private void notify_vm_is_running_in_background (LibvirtMachine machine) {
         if (!machine.run_in_bg && !machine.is_running)
             return;
 
@@ -547,9 +547,11 @@ private void keep_on_running_on_background () {
 
             var keep_vm_running = (machine.run_in_bg && machine.is_running);
             if (keep_vm_running) {
+#if FLATPAK
                 run_in_bg = true;
+#endif
 
-                keep_vm_running_in_background (machine);
+                notify_vm_is_running_in_background (machine);
                 debug ("Keep running %s in the background", machine.name);
 
             }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]