mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-724: Always emit focus events when focused client changes, even if the change occurs only due to replacing a disconnected client with a connected one.
This commit is contained in:
@@ -470,10 +470,6 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams
|
||||
var oldFocusedClient = $scope.focusedClient;
|
||||
$scope.focusedClient = newFocusedClient;
|
||||
|
||||
// Ignore if focus is not actually changing
|
||||
if (oldFocusedClient === newFocusedClient)
|
||||
return;
|
||||
|
||||
// Apply any parameter changes when focus is changing
|
||||
if (oldFocusedClient)
|
||||
$scope.applyParameterChanges(oldFocusedClient);
|
||||
|
@@ -74,7 +74,7 @@ angular.module('client').directive('guacTiledClients', [function guacTiledClient
|
||||
* The currently-focused client, or null if there are no focused
|
||||
* clients or if multiple clients are focused.
|
||||
*/
|
||||
var getFocusedClient = function getFocusedClient() {
|
||||
$scope.getFocusedClient = function getFocusedClient() {
|
||||
|
||||
var managedClientGroup = $scope.clientGroup;
|
||||
if (managedClientGroup) {
|
||||
@@ -87,10 +87,9 @@ angular.module('client').directive('guacTiledClients', [function guacTiledClient
|
||||
|
||||
};
|
||||
|
||||
// Re-initialize the reference to the currently-focused client when a
|
||||
// new client group is set
|
||||
$scope.$watch('clientGroup', function clientGroupChanged() {
|
||||
$scope.$emit('guacClientFocused', getFocusedClient());
|
||||
// Notify whenever identify of currently-focused client changes
|
||||
$scope.$watch('getFocusedClient()', function focusedClientChanged(focusedClient) {
|
||||
$scope.$emit('guacClientFocused', focusedClient);
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -147,10 +146,6 @@ angular.module('client').directive('guacTiledClients', [function guacTiledClient
|
||||
|
||||
}
|
||||
|
||||
// Update reference to single focused client after focus has
|
||||
// changed
|
||||
$scope.$emit('guacClientFocused', getFocusedClient());
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user