GNOME Bugzilla – Bug 679751
screenshot not properly updated on machine shutdown
Last modified: 2016-03-31 13:58:31 UTC
When I shutdown a windows xp box, after it has shutdown, its thumbnail doesn't get its gray overlay to indicate it's off. The 'stopped' event arrives after the display is disconnected, and the thumbnail is updated in Machine::disconnect_display. Since at that time the machine is still running, Machine::draw_vm doesn't add an overlay on top of the thumbnail. Not sure what the best way to solve this is... Connect to Machine::state:stopped and set the overlay from there maybe?
(In reply to comment #0) > When I shutdown a windows xp box, after it has shutdown, its thumbnail doesn't > get its gray overlay to indicate it's off. The 'stopped' event arrives after > the display is disconnected, and the thumbnail is updated in > Machine::disconnect_display. Since at that time the machine is still running, > Machine::draw_vm doesn't add an overlay on top of the thumbnail. > Not sure what the best way to solve this is... Connect to > Machine::state:stopped and set the overlay from there maybe? Yeah, I thought that is how we do it already.
Created attachment 219321 [details] [review] screenshot not properly updated on machine shutdown
Reloading blindly the screenshot from disk feels quite heavyweight as Machine::disconnect_display was changed to set it with no intermediate file in a5539fd063
(In reply to comment #3) > Reloading blindly the screenshot from disk feels quite heavyweight as > Machine::disconnect_display was changed to set it with no intermediate file in > a5539fd063 disconnect_display actually writes to disk, most likely the file is hot in the cache here. And nowadays, we save small files. otherwise, we need to keep the pixbuf around (which we actually probably have, but then it's convoluted code). Tbh, this is not an optimization I am interested in here. As I pointed out from the very begnining of screenshot opt., the biggest offender is still qemu & libvirt, not really boxes, even after Alex changes, and there are drawbacks to his approach. I prefer looking for the big fish. But feel free to improve the patch. In the meantime, it feels really broken to not have the machine state correct when shuting down, so perhaps we could keep the bug open for micro-optimization?
Review of attachment 219321 [details] [review]: ACK but IMO commit log summary should summarize what the patch does rather than the issue it solves: Properly update screenshot on shutdown
Attachment 219321 [details] pushed as c48d146 - screenshot not properly updated on machine shutdown