Ticket #33: Fixed handling of cursor.
This commit is contained in:
parent
775668ad37
commit
5516fc395b
@ -153,18 +153,20 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
|||||||
|
|
||||||
/* Do not handle clipboard and local cursor if read-only */
|
/* Do not handle clipboard and local cursor if read-only */
|
||||||
if (read_only == 0) {
|
if (read_only == 0) {
|
||||||
/* Enable client-side cursor */
|
|
||||||
rfb_client->GotCursorShape = guac_vnc_cursor;
|
|
||||||
rfb_client->appData.useRemoteCursor = TRUE;
|
|
||||||
|
|
||||||
/* Clipboard */
|
/* Clipboard */
|
||||||
rfb_client->GotXCutText = guac_vnc_cut_text;
|
rfb_client->GotXCutText = guac_vnc_cut_text;
|
||||||
}
|
|
||||||
|
|
||||||
/* Set remote cursor */
|
/* Set remote cursor */
|
||||||
if(remote_cursor) {
|
if(remote_cursor) {
|
||||||
rfb_client->appData.useRemoteCursor = TRUE;
|
rfb_client->appData.useRemoteCursor = FALSE;
|
||||||
guac_vnc_set_default_pointer(client);
|
guac_vnc_set_default_pointer(client);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* Enable client-side cursor */
|
||||||
|
rfb_client->appData.useRemoteCursor = TRUE;
|
||||||
|
rfb_client->GotCursorShape = guac_vnc_cursor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Password */
|
/* Password */
|
||||||
|
@ -41,20 +41,26 @@
|
|||||||
#include <guacamole/socket.h>
|
#include <guacamole/socket.h>
|
||||||
|
|
||||||
/* Macros for prettying up the embedded image. */
|
/* Macros for prettying up the embedded image. */
|
||||||
|
#define X 0x00,0x00,0x00,0xFF
|
||||||
#define O 0xFF,0xFF,0xFF,0xFF
|
#define O 0xFF,0xFF,0xFF,0xFF
|
||||||
|
#define _ 0x00,0x00,0x00,0x00
|
||||||
|
|
||||||
/* Dimensions */
|
/* Dimensions */
|
||||||
const int guac_vnc_default_pointer_width = 1;
|
const int guac_vnc_default_pointer_width = 5;
|
||||||
const int guac_vnc_default_pointer_height = 1;
|
const int guac_vnc_default_pointer_height = 5;
|
||||||
|
|
||||||
/* Format */
|
/* Format */
|
||||||
const cairo_format_t guac_vnc_default_pointer_format = CAIRO_FORMAT_ARGB32;
|
const cairo_format_t guac_vnc_default_pointer_format = CAIRO_FORMAT_ARGB32;
|
||||||
const int guac_vnc_default_pointer_stride = 44;
|
const int guac_vnc_default_pointer_stride = 20;
|
||||||
|
|
||||||
/* Embedded pointer graphic */
|
/* Embedded pointer graphic */
|
||||||
unsigned char guac_vnc_default_pointer[] = {
|
unsigned char guac_vnc_default_pointer[] = {
|
||||||
|
|
||||||
O
|
_,O,O,O,_,
|
||||||
|
O,X,X,X,O,
|
||||||
|
O,X,X,X,O,
|
||||||
|
O,X,X,X,O,
|
||||||
|
_,O,O,O,_
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -77,7 +83,7 @@ void guac_vnc_set_default_pointer(guac_client* client) {
|
|||||||
cairo_surface_destroy(graphic);
|
cairo_surface_destroy(graphic);
|
||||||
|
|
||||||
/* Set cursor */
|
/* Set cursor */
|
||||||
guac_protocol_send_cursor(socket, 0, 0, cursor,
|
guac_protocol_send_cursor(socket, 2, 2, cursor,
|
||||||
0, 0,
|
0, 0,
|
||||||
guac_vnc_default_pointer_width,
|
guac_vnc_default_pointer_width,
|
||||||
guac_vnc_default_pointer_height);
|
guac_vnc_default_pointer_height);
|
||||||
|
Loading…
Reference in New Issue
Block a user