GUACAMOLE-518: Correct signedness of keyboard flag variables.
This commit is contained in:
parent
96c4c208b4
commit
67450d89f3
@ -186,7 +186,7 @@ static void guac_rdp_send_unicode_event(guac_rdp_client* rdp_client,
|
||||
* lock keys will be active.
|
||||
*/
|
||||
static void guac_rdp_send_synchronize_event(guac_rdp_client* rdp_client,
|
||||
int flags) {
|
||||
UINT32 flags) {
|
||||
|
||||
/* Skip if not yet connected */
|
||||
freerdp* rdp_inst = rdp_client->rdp_inst;
|
||||
@ -432,13 +432,13 @@ static void guac_rdp_keyboard_send_missing_key(guac_rdp_keyboard* keyboard,
|
||||
}
|
||||
|
||||
void guac_rdp_keyboard_update_locks(guac_rdp_keyboard* keyboard,
|
||||
int set_flags, int clear_flags) {
|
||||
unsigned int set_flags, unsigned int clear_flags) {
|
||||
|
||||
guac_client* client = keyboard->client;
|
||||
guac_rdp_client* rdp_client = (guac_rdp_client*) client->data;
|
||||
|
||||
/* Calculate updated lock flags */
|
||||
int lock_flags = (keyboard->lock_flags | set_flags) & ~clear_flags;
|
||||
unsigned int lock_flags = (keyboard->lock_flags | set_flags) & ~clear_flags;
|
||||
|
||||
/* Synchronize remote side only if lock flags have changed */
|
||||
if (lock_flags != keyboard->lock_flags) {
|
||||
@ -449,7 +449,7 @@ void guac_rdp_keyboard_update_locks(guac_rdp_keyboard* keyboard,
|
||||
}
|
||||
|
||||
void guac_rdp_keyboard_update_modifiers(guac_rdp_keyboard* keyboard,
|
||||
int set_flags, int clear_flags) {
|
||||
unsigned int set_flags, unsigned int clear_flags) {
|
||||
|
||||
/* Only clear modifiers that are set */
|
||||
clear_flags &= keyboard->modifier_flags;
|
||||
|
@ -86,14 +86,14 @@ typedef struct guac_rdp_keyboard {
|
||||
* @see GUAC_RDP_KEYMAP_MODIFIER_SHIFT
|
||||
* @see GUAC_RDP_KEYMAP_MODIFIER_ALTGR
|
||||
*/
|
||||
int modifier_flags;
|
||||
unsigned int modifier_flags;
|
||||
|
||||
/**
|
||||
* The local state of all known lock keys, as a bitwise OR of all RDP lock
|
||||
* key flags. Legal flags are KBD_SYNC_SCROLL_LOCK, KBD_SYNC_NUM_LOCK,
|
||||
* KBD_SYNC_CAPS_LOCK, and KBD_SYNC_KANA_LOCK.
|
||||
*/
|
||||
int lock_flags;
|
||||
UINT32 lock_flags;
|
||||
|
||||
/**
|
||||
* Whether the states of remote lock keys (Caps lock, Num lock, etc.) have
|
||||
@ -184,7 +184,7 @@ int guac_rdp_keyboard_is_defined(guac_rdp_keyboard* keyboard, int keysym);
|
||||
* KBD_SYNC_KANA_LOCK.
|
||||
*/
|
||||
void guac_rdp_keyboard_update_locks(guac_rdp_keyboard* keyboard,
|
||||
int set_flags, int clear_flags);
|
||||
unsigned int set_flags, unsigned int clear_flags);
|
||||
|
||||
/**
|
||||
* Updates the local state of the modifier keys (such as Shift or AltGr),
|
||||
@ -204,7 +204,7 @@ void guac_rdp_keyboard_update_locks(guac_rdp_keyboard* keyboard,
|
||||
* The modifier key flags which should be cleared.
|
||||
*/
|
||||
void guac_rdp_keyboard_update_modifiers(guac_rdp_keyboard* keyboard,
|
||||
int set_flags, int clear_flags);
|
||||
unsigned int set_flags, unsigned int clear_flags);
|
||||
|
||||
/**
|
||||
* Updates the local state of the given keysym, sending the key events required
|
||||
|
@ -64,7 +64,7 @@ typedef struct guac_rdp_keysym_desc {
|
||||
* @see GUAC_RDP_KEYMAP_MODIFIER_SHIFT
|
||||
* @see GUAC_RDP_KEYMAP_MODIFIER_ALTGR
|
||||
*/
|
||||
const int set_modifiers;
|
||||
const unsigned int set_modifiers;
|
||||
|
||||
/**
|
||||
* Bitwise-OR of the flags of any modifiers that must NOT be active for the
|
||||
@ -78,7 +78,7 @@ typedef struct guac_rdp_keysym_desc {
|
||||
* @see GUAC_RDP_KEYMAP_MODIFIER_SHIFT
|
||||
* @see GUAC_RDP_KEYMAP_MODIFIER_ALTGR
|
||||
*/
|
||||
const int clear_modifiers;
|
||||
const unsigned int clear_modifiers;
|
||||
|
||||
/**
|
||||
* Bitwise OR of the flags of all lock keys (ie: Caps lock, Num lock, etc.)
|
||||
@ -86,7 +86,7 @@ typedef struct guac_rdp_keysym_desc {
|
||||
* are KBD_SYNC_SCROLL_LOCK, KBD_SYNC_NUM_LOCK, KBD_SYNC_CAPS_LOCK, and
|
||||
* KBD_SYNC_KANA_LOCK.
|
||||
*/
|
||||
const int set_locks;
|
||||
const unsigned int set_locks;
|
||||
|
||||
/**
|
||||
* Bitwise OR of the flags of all lock keys (ie: Caps lock, Num lock, etc.)
|
||||
@ -94,7 +94,7 @@ typedef struct guac_rdp_keysym_desc {
|
||||
* are KBD_SYNC_SCROLL_LOCK, KBD_SYNC_NUM_LOCK, KBD_SYNC_CAPS_LOCK, and
|
||||
* KBD_SYNC_KANA_LOCK.
|
||||
*/
|
||||
const int clear_locks;
|
||||
const unsigned int clear_locks;
|
||||
|
||||
} guac_rdp_keysym_desc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user