Skip to content

Commit

Permalink
GUACAMOLE-1904: Broadcast events for mouse/touch events in client.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuehlner committed Jan 30, 2024
1 parent c2697fa commit 05b9d35
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ angular.module('client').directive('guacClient', [function guacClient() {
const ManagedClient = $injector.get('ManagedClient');

// Required services
const $rootScope = $injector.get('$rootScope');
const $window = $injector.get('$window');

/**
Expand Down Expand Up @@ -220,6 +221,9 @@ angular.module('client').directive('guacClient', [function guacClient() {
display.showCursor(!localCursor);
client.sendMouseState(event.state, true);

// Broadcast the mouse event
$rootScope.$broadcast('guacClientMouseEvent', event);

};

/**
Expand Down Expand Up @@ -248,6 +252,9 @@ angular.module('client').directive('guacClient', [function guacClient() {
scrollToMouse(event.state);
client.sendMouseState(event.state, true);

// Broadcast the mouse event
$rootScope.$broadcast('guacClientMouseEvent', event);

};

/**
Expand All @@ -269,6 +276,9 @@ angular.module('client').directive('guacClient', [function guacClient() {
display.showCursor(false);
client.sendTouchState(event.state, true);

// Broadcast the touch event
$rootScope.$broadcast('guacClientTouchEvent', event);

};

// Attach any given managed client
Expand Down

0 comments on commit 05b9d35

Please sign in to comment.