GUAC-1480: Don't set the clipboard state if it hasn't changed.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/b361168b
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/b361168b
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/b361168b

Branch: refs/heads/master
Commit: b361168bb9232ea9809b49c5c268c5888b54bbf6
Parents: 7ec53c9
Author: James Muehlner <[email protected]>
Authored: Mon Feb 1 23:05:05 2016 -0800
Committer: James Muehlner <[email protected]>
Committed: Mon Feb 1 23:05:05 2016 -0800

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/client/directives/guacClient.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/b361168b/guacamole/src/main/webapp/app/client/directives/guacClient.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/client/directives/guacClient.js 
b/guacamole/src/main/webapp/app/client/directives/guacClient.js
index 5ea960f..f12cc79 100644
--- a/guacamole/src/main/webapp/app/client/directives/guacClient.js
+++ b/guacamole/src/main/webapp/app/client/directives/guacClient.js
@@ -414,8 +414,10 @@ angular.module('client').directive('guacClient', [function 
guacClient() {
 
             // Update remote clipboard if local clipboard changes
             $scope.$on('guacClipboard', function onClipboard(event, mimetype, 
data) {
-                if (client)
+                if (client && data !== $scope.client.clipboardData) {
                     client.setClipboard(data);
+                    $scope.client.clipboardData = data;
+                }
             });
 
             // Translate local keydown events to remote keydown events if 
keyboard is enabled

Reply via email to