[gnome-boxes] vm-creator: Set run-in-background during install



commit 07b9f37cc98a1eecbe2d53886128631d7d1b173e
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Apr 20 13:44:59 2017 +0200

    vm-creator: Set run-in-background during install
    
    An ongoing installation could be interrupted by Boxes window
    being closed or an application crash because we are suspending
    the VMs in the GtkApplication vfunc_shutdown method.
    
    In doing so, let's set a VM to run in background during its
    installation so it doesn't get suspended.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781462

 src/vm-creator.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 20d69ef..8851bd4 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -58,6 +58,7 @@ private class Boxes.VMCreator {
                                                                      App.app.default_connection,
                                                                      domain);
         machine.vm_creator = this;
+        machine.run_in_bg = true;
 
         return machine;
     }
@@ -197,6 +198,7 @@ private class Boxes.VMCreator {
             var config = machine.domain.get_config (GVir.DomainXMLFlags.INACTIVE);
             VMConfigurator.post_install_setup (config, install_media);
             machine.domain.set_config (config);
+            machine.run_in_bg = false;
         } catch (GLib.Error error) {
             warning ("Failed to set post-install configuration on '%s': %s", machine.name, error.message);
         }


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