mirror of https://github.com/neutrinolabs/xrdp
Addressed review comments
This commit is contained in:
parent
1e78b42022
commit
48644258e0
|
@ -2492,10 +2492,16 @@ xrdp_mm_trans_process_unicode_ack(struct xrdp_mm *self,
|
||||||
LOG(LOG_LEVEL_INFO, "Chansrv does not support Unicode input");
|
LOG(LOG_LEVEL_INFO, "Chansrv does not support Unicode input");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case 2:
|
||||||
LOG(LOG_LEVEL_INFO,
|
LOG(LOG_LEVEL_INFO,
|
||||||
"Chansrv reported an error starting the Unicode input method");
|
"Chansrv reported an error starting the Unicode input method");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
LOG(LOG_LEVEL_INFO,
|
||||||
|
"Chansrv reported an unknown status %d"
|
||||||
|
" starting the Unicode input method", status);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1730,19 +1730,8 @@ xrdp_wm_key_unicode(struct xrdp_wm *self, int device_flags, char32_t c16)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send the character to chansrv if it's capable of doing something
|
// See if we can find the character in the existing keymap,
|
||||||
// with it
|
// and if so, generate normal key event(s) for it
|
||||||
if (self->mm->chan_trans != NULL &&
|
|
||||||
self->client_info->unicode_input_support == UIS_ACTIVE &&
|
|
||||||
self->mm->chan_trans->status == TRANS_STATUS_UP)
|
|
||||||
{
|
|
||||||
xrdp_mm_send_unicode_to_chansrv(self->mm,
|
|
||||||
!(device_flags & KBD_FLAG_UP), c32);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fallback - see if we can find the character in the existing keymap,
|
|
||||||
// and if so, generate a normal key event.
|
|
||||||
for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++)
|
for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++)
|
||||||
{
|
{
|
||||||
if (c32 == self->keymap.keys_noshift[index].chr)
|
if (c32 == self->keymap.keys_noshift[index].chr)
|
||||||
|
@ -1811,6 +1800,17 @@ xrdp_wm_key_unicode(struct xrdp_wm *self, int device_flags, char32_t c16)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send the character to chansrv if it's capable of doing something
|
||||||
|
// with it
|
||||||
|
if (self->mm->chan_trans != NULL &&
|
||||||
|
self->client_info->unicode_input_support == UIS_ACTIVE &&
|
||||||
|
self->mm->chan_trans->status == TRANS_STATUS_UP)
|
||||||
|
{
|
||||||
|
xrdp_mm_send_unicode_to_chansrv(self->mm,
|
||||||
|
!(device_flags & KBD_FLAG_UP), c32);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue