Minor performance enhancements - do NOT take thumbnails every 1000ms, and only use transfer function if not NOP and not a simple copy.
This commit is contained in:
1 parent
a47735969b
commit
c71ea434c9
3 files changed
+70
-29
No files matched your search
@@ -933,24 +933,6 @@ GuacUI.Client.attach = function(guac) {
|
||||
|
||||
};
|
||||
|
||||
var thumbnail_update_interval = null;
|
||||
|
||||
window.onblur = function() {
|
||||
|
||||
// Regularly update screenshot if window not visible
|
||||
if (!thumbnail_update_interval)
|
||||
thumbnail_update_interval =
|
||||
window.setInterval(GuacUI.Client.updateThumbnail, 1000);
|
||||
|
||||
};
|
||||
|
||||
window.onfocus = function() {
|
||||
if (thumbnail_update_interval) {
|
||||
window.clearInterval(thumbnail_update_interval);
|
||||
thumbnail_update_interval = null;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Disconnect and update thumbnail on close
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user