|
|
|
@ -618,9 +618,15 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
|
|
|
|
|
int log_width;
|
|
|
|
|
int log_height;
|
|
|
|
|
int regular;
|
|
|
|
|
int i = 0;
|
|
|
|
|
int primaryxoffset = 0;
|
|
|
|
|
int primaryyoffset = 0;
|
|
|
|
|
|
|
|
|
|
globals = &self->xrdp_config->cfg_globals;
|
|
|
|
|
|
|
|
|
|
primaryxoffset = self->screen->width / 2;
|
|
|
|
|
primaryyoffset = self->screen->height / 2;
|
|
|
|
|
|
|
|
|
|
log_width = globals->ls_width;
|
|
|
|
|
log_height = globals->ls_height;
|
|
|
|
|
regular = 1;
|
|
|
|
@ -639,6 +645,20 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
|
|
|
|
|
regular = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* multimon scenario, draw login window on primary monitor */
|
|
|
|
|
if (self->client_info->monitorCount > 1)
|
|
|
|
|
{
|
|
|
|
|
for (i = 0; i < self->client_info->monitorCount; ++i)
|
|
|
|
|
{
|
|
|
|
|
if (self->client_info->minfo[i].is_primary)
|
|
|
|
|
{
|
|
|
|
|
primaryxoffset = self->screen->width - (self->client_info->minfo[i].right / 2) - 1;
|
|
|
|
|
primaryyoffset = self->screen->height - (self->client_info->minfo[i].bottom / 2) - 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* draw login window */
|
|
|
|
|
self->login_window = xrdp_bitmap_create(log_width, log_height, self->screen->bpp,
|
|
|
|
|
WND_TYPE_WND, self);
|
|
|
|
@ -647,12 +667,13 @@ xrdp_login_wnd_create(struct xrdp_wm *self)
|
|
|
|
|
self->login_window->owner = self->screen;
|
|
|
|
|
self->login_window->bg_color = globals->ls_bg_color;
|
|
|
|
|
|
|
|
|
|
self->login_window->left = self->screen->width / 2 -
|
|
|
|
|
self->login_window->left = primaryxoffset -
|
|
|
|
|
self->login_window->width / 2;
|
|
|
|
|
|
|
|
|
|
self->login_window->top = self->screen->height / 2 -
|
|
|
|
|
self->login_window->top = primaryyoffset -
|
|
|
|
|
self->login_window->height / 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self->login_window->notify = xrdp_wm_login_notify;
|
|
|
|
|
|
|
|
|
|
/* if window title not specified, use hostname as default */
|
|
|
|
|