mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1480: Fix broken menu clipboard regression.
This commit is contained in:
@@ -372,13 +372,18 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
|||||||
|
|
||||||
// Send clipboard data if menu is hidden
|
// Send clipboard data if menu is hidden
|
||||||
if (!menuShown && menuShownPreviousState)
|
if (!menuShown && menuShownPreviousState)
|
||||||
$scope.$broadcast('guacClipboard', 'text/plain', $scope.client.clipboardData);
|
$scope.$broadcast('guacClipboard', 'text/plain', $scope.client.clipboardData);
|
||||||
|
|
||||||
// Disable client keyboard if the menu is shown
|
// Disable client keyboard if the menu is shown
|
||||||
$scope.client.clientProperties.keyboardEnabled = !menuShown;
|
$scope.client.clientProperties.keyboardEnabled = !menuShown;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Update remote clipboard if local clipboard changes
|
||||||
|
$scope.$on('guacClipboard', function onClipboard(event, mimetype, data) {
|
||||||
|
$scope.client.clipboardData = data;
|
||||||
|
});
|
||||||
|
|
||||||
$scope.$on('guacKeydown', function keydownListener(event, keysym, keyboard) {
|
$scope.$on('guacKeydown', function keydownListener(event, keysym, keyboard) {
|
||||||
keysCurrentlyPressed[keysym] = true;
|
keysCurrentlyPressed[keysym] = true;
|
||||||
|
|
||||||
|
@@ -413,11 +413,9 @@ angular.module('client').directive('guacClient', [function guacClient() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Update remote clipboard if local clipboard changes
|
// Update remote clipboard if local clipboard changes
|
||||||
$scope.$on('guacClipboard', function onClipboard(event, mimetype, data) {
|
$scope.$watch('client.clipboardData', function clipboardChanged(data) {
|
||||||
if (client && data !== $scope.client.clipboardData) {
|
if (client)
|
||||||
client.setClipboard(data);
|
client.setClipboard(data);
|
||||||
$scope.client.clipboardData = data;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Translate local keydown events to remote keydown events if keyboard is enabled
|
// Translate local keydown events to remote keydown events if keyboard is enabled
|
||||||
|
Reference in New Issue
Block a user