Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
matt335672 committed Apr 30, 2024
1 parent 4535ce8 commit 2d21566
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
8 changes: 7 additions & 1 deletion xrdp/xrdp_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2491,10 +2491,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;
Expand Down
26 changes: 13 additions & 13 deletions xrdp/xrdp_wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2d21566

Please sign in to comment.