[gnome-boxes/gnome-40-fix-run-in-bg] app: Keep running for run-in-bg VMs only in Flatpak




commit 01922ea366398720073b566823dfa0568817a422
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Jun 23 11:39:06 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, 6 insertions(+)
---
diff --git a/src/app.vala b/src/app.vala
index 4e69ee79..77201ddf 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -289,8 +289,10 @@ public bool quit_app () {
         display.flush ();
 
         keep_on_running_on_background ();
+#if FLATPAK
         if (run_in_bg)
             return true;
+#endif
 
         Idle.add (() => {
             quit ();
@@ -302,6 +304,9 @@ public bool quit_app () {
     }
 
     public override void shutdown () {
+#if !FLATPAK
+        base.shutdown ();
+#else
         if (!run_in_bg) {
             base.shutdown ();
 
@@ -311,6 +316,7 @@ public override void shutdown () {
         } else {
             this.hold ();
         }
+#endif
 
         foreach (var window in windows) {
             window.notificationbar.dismiss_all ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]