xrdp: fix for prefilled username issue

This commit is contained in:
speidy 2014-07-11 09:11:10 +03:00
parent 7d5f7d1133
commit aa0f039cef

View File

@ -335,7 +335,9 @@ xrdp_wm_show_edits(struct xrdp_wm *self, struct xrdp_bitmap *combo)
}
}
if (g_strncmp(name, "username", 255) == 0)
if (g_strncmp(name, "username", 255) == 0 &&
self->session->client_info->username[0])
{
g_strncpy(b->caption1, self->session->client_info->username, 255);
b->edit_pos = g_mbstowcs(0, b->caption1, 0);