GNOME Bugzilla – Bug 736081
Snapshots: Properties view of second window stays insensitive after revert
Last modified: 2016-03-31 13:22:07 UTC
I have no idea why exactly this happens, but if you open a VM in another window, then revert to a snapshot, it will first mark the back button and the sidebar insensitive, revert and then mark the back button and sidebar of the original/main window sensitive. The widgets in window2 stay insensitive. Now, if you go back to window1 and open the vm in another window again (which shouldn't work I guess, but it does), the behavior is reproducible. I guess that machine.window points to window1 for some reason since the notifications when deleting a snapshot also appear at window1. This happens *only* after reverting to a snapshot.
Created attachment 285427 [details] [review] 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.
Review of attachment 285427 [details] [review]: ACK, however if this solves the bug, you should mention in the details section about the issue.
Created attachment 285676 [details] [review] 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. This previously caused to break reverting to a snapshot of a VM that had been started in a new window.
Review of attachment 285676 [details] [review]: Last sentence is a bit ambiguous. Would this be correct "This broke snapshot reverting for VMs that are running in a separate window."? If so, lets go with this instead unless you want to rather describe 'break' (which I'll prefer you do).
Created attachment 285963 [details] [review] 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.
Review of attachment 285963 [details] [review]: Perfect :)
Attachment 285963 [details] pushed as a8065b7 - libvirt-machine: Reset window on display reconnect