[gnome-boxes] libvirt-machine: Reset window on display reconnect
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] libvirt-machine: Reset window on display reconnect
- Date: Fri, 12 Sep 2014 13:47:27 +0000 (UTC)
commit a8065b79202533de4a97d9dface9d960e70d50ac
Author: Timm Bäder <mail baedert org>
Date: Thu Sep 4 23:52:35 2014 +0200
libvirt-machine: Reset window on display reconnect
When reconnecting the display, we first disconnect the display and then
connect it again. Disconnecting however sets the window of a Machine to
null which we want to avoid in the case of reconnecting. Since Machine
defaults to the application's main_window if the machine's window is
unset, reconnecting the display caused the machine to be displayed in
the main_window and not in the window the user opened specifically for
it.
We fix this by saving the window of the machine, then reconnecting the
display and then just reassigning the window to the machine again.
https://bugzilla.gnome.org/show_bug.cgi?id=736081
src/libvirt-machine.vala | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index cd58be5..b86a7da 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -97,7 +97,9 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
if (display == null)
return;
+ var current_window = this.window;
disconnect_display ();
+ this.window = current_window;
connect_display.begin (Machine.ConnectFlags.NONE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]