Addressed review comments

This commit is contained in:
matt335672 2024-04-30 09:23:09 +01:00 committed by sefler
parent 1e78b42022
commit 48644258e0
2 changed files with 20 additions and 14 deletions

View File

@ -2492,10 +2492,16 @@ xrdp_mm_trans_process_unicode_ack(struct xrdp_mm *self,
LOG(LOG_LEVEL_INFO, "Chansrv does not support Unicode input");
break;
default:
case 2:
LOG(LOG_LEVEL_INFO,
"Chansrv reported an error starting the Unicode input method");
break;
default:
LOG(LOG_LEVEL_INFO,
"Chansrv reported an unknown status %d"
" starting the Unicode input method", status);
break;
}
return 0;

View File

@ -1730,19 +1730,8 @@ xrdp_wm_key_unicode(struct xrdp_wm *self, int device_flags, char32_t c16)
return 0;
}
// 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;
}
// Fallback - see if we can find the character in the existing keymap,
// and if so, generate a normal key event.
// See if we can find the character in the existing keymap,
// and if so, generate normal key event(s) for it
for (index = XR_MIN_KEY_CODE; index < XR_MAX_KEY_CODE; index++)
{
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;
}