GUACAMOLE-313: Add support for including mouse location within session recordings.
This commit is contained in:
parent
b37e73488f
commit
df770ae4ea
@ -101,5 +101,20 @@ guac_common_recording* guac_common_recording_create(guac_client* client,
|
||||
*/
|
||||
void guac_common_recording_free(guac_common_recording* recording);
|
||||
|
||||
/**
|
||||
* Reports the current mouse position within the recording.
|
||||
*
|
||||
* @param recording
|
||||
* The guac_common_recording associated with the mouse that has moved.
|
||||
*
|
||||
* @param x
|
||||
* The new X coordinate of the mouse cursor, in pixels.
|
||||
*
|
||||
* @param y
|
||||
* The new Y coordinate of the mouse cursor, in pixels.
|
||||
*/
|
||||
void guac_common_recording_report_mouse(guac_common_recording* recording,
|
||||
int x, int y);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "common/recording.h"
|
||||
|
||||
#include <guacamole/client.h>
|
||||
#include <guacamole/protocol.h>
|
||||
#include <guacamole/socket.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
@ -177,3 +178,11 @@ void guac_common_recording_free(guac_common_recording* recording) {
|
||||
free(recording);
|
||||
}
|
||||
|
||||
void guac_common_recording_report_mouse(guac_common_recording* recording,
|
||||
int x, int y) {
|
||||
|
||||
/* Report mouse location */
|
||||
guac_protocol_send_mouse(recording->socket, x, y);
|
||||
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "common/recording.h"
|
||||
#include "input.h"
|
||||
#include "keyboard.h"
|
||||
#include "rdp.h"
|
||||
@ -49,6 +50,10 @@ int guac_rdp_user_mouse_handler(guac_user* user, int x, int y, int mask) {
|
||||
/* Store current mouse location */
|
||||
guac_common_cursor_move(rdp_client->display->cursor, user, x, y);
|
||||
|
||||
/* Report mouse position within recording */
|
||||
if (rdp_client->recording != NULL)
|
||||
guac_common_recording_report_mouse(rdp_client->recording, x, y);
|
||||
|
||||
/* If button mask unchanged, just send move event */
|
||||
if (mask == rdp_client->mouse_button_mask)
|
||||
rdp_inst->input->MouseEvent(rdp_inst->input, PTR_FLAGS_MOVE, x, y);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "common/cursor.h"
|
||||
#include "common/display.h"
|
||||
#include "common/recording.h"
|
||||
#include "ssh.h"
|
||||
#include "terminal/terminal.h"
|
||||
|
||||
@ -40,6 +41,10 @@ int guac_ssh_user_mouse_handler(guac_user* user, int x, int y, int mask) {
|
||||
if (term == NULL)
|
||||
return 0;
|
||||
|
||||
/* Report mouse position within recording */
|
||||
if (ssh_client->recording != NULL)
|
||||
guac_common_recording_report_mouse(ssh_client->recording, x, y);
|
||||
|
||||
/* Send mouse event */
|
||||
guac_terminal_send_mouse(term, user, x, y, mask);
|
||||
return 0;
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "common/recording.h"
|
||||
#include "input.h"
|
||||
#include "terminal/terminal.h"
|
||||
#include "telnet.h"
|
||||
@ -42,6 +43,10 @@ int guac_telnet_user_mouse_handler(guac_user* user, int x, int y, int mask) {
|
||||
if (term == NULL)
|
||||
return 0;
|
||||
|
||||
/* Report mouse position within recording */
|
||||
if (telnet_client->recording != NULL)
|
||||
guac_common_recording_report_mouse(telnet_client->recording, x, y);
|
||||
|
||||
/* Send mouse if not searching for password or username */
|
||||
if (settings->password_regex == NULL && settings->username_regex == NULL)
|
||||
guac_terminal_send_mouse(term, user, x, y, mask);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "common/cursor.h"
|
||||
#include "common/display.h"
|
||||
#include "common/recording.h"
|
||||
#include "vnc.h"
|
||||
|
||||
#include <guacamole/user.h>
|
||||
@ -35,6 +36,10 @@ int guac_vnc_user_mouse_handler(guac_user* user, int x, int y, int mask) {
|
||||
/* Store current mouse location */
|
||||
guac_common_cursor_move(vnc_client->display->cursor, user, x, y);
|
||||
|
||||
/* Report mouse position within recording */
|
||||
if (vnc_client->recording != NULL)
|
||||
guac_common_recording_report_mouse(vnc_client->recording, x, y);
|
||||
|
||||
/* Send VNC event only if finished connecting */
|
||||
if (rfb_client != NULL)
|
||||
SendPointerEvent(rfb_client, x, y, mask);
|
||||
|
Loading…
Reference in New Issue
Block a user