Ecore_Timer *frame_timer;
pixman_image_t *pix_surface;
tbm_surface_h tbm_surface;
+ uint32_t w;
+ uint32_t h;
struct wl_list peers;
};
output = (E_Rdp_Output *)data;
- tbm_surface = _e_rdp_tbm_image_create(output, E_RDP_WIDTH, E_RDP_HEIGHT, 0x00000000);
+ tbm_surface = _e_rdp_tbm_image_create(output, output->w, output->h, 0x00000000);
if (tbm_surface == NULL)
{
ERR("create tbm surface failed");
/* sends a full refresh */
box.x1 = 0;
box.y1 = 0;
- box.x2 = E_RDP_WIDTH;
- box.y2 = E_RDP_HEIGHT;
+ box.x2 = output->w;
+ box.y2 = output->h;
pixman_region32_init_with_extents(&damage, &box);
wl_list_for_each_safe(rdp_peer, tmp, &output->peers, link)
settings->CompressionEnabled = FALSE;
}
- if (E_RDP_WIDTH != (int)settings->DesktopWidth || E_RDP_HEIGHT != (int)settings->DesktopHeight)
+ if (output->w != settings->DesktopWidth || output->h != settings->DesktopHeight)
{
if (b->no_clients_resize)
{
}
else
{
- settings->DesktopWidth = E_RDP_WIDTH;
- settings->DesktopHeight = E_RDP_HEIGHT;
+ settings->DesktopWidth = output->w;
+ settings->DesktopHeight = output->h;
client->update->DesktopResize(client->context);
}
}
}
}
- rfx_context_reset(peerCtx->rfx_context, E_RDP_WIDTH, E_RDP_HEIGHT);
- nsc_context_reset(peerCtx->nsc_context, E_RDP_WIDTH, E_RDP_HEIGHT);
+ rfx_context_reset(peerCtx->rfx_context, output->w, output->h);
+ nsc_context_reset(peerCtx->nsc_context, output->w, output->h);
if (peersItem->flags & RDP_PEER_ACTIVATED)
return TRUE;
pointer_system.type = SYSPTR_NULL;
pointer->PointerSystem(client->context, &pointer_system);
- tbm_surface = _e_rdp_tbm_image_create(output, E_RDP_WIDTH, E_RDP_HEIGHT, 0xFFFFCCFF);
+ tbm_surface = _e_rdp_tbm_image_create(output, output->w, output->h, 0xFFFFCCFF);
if (tbm_surface == NULL)
{
ERR("create sample tbm surface failed");
/* sends a full refresh */
box.x1 = 0;
box.y1 = 0;
- box.x2 = E_RDP_WIDTH;
- box.y2 = E_RDP_HEIGHT;
+ box.x2 = output->w;
+ box.y2 = output->h;
pixman_region32_init_with_extents(&damage, &box);
e_rdp_peer_refresh_region(&damage, client, tbm_surface, pix_surface);
e_rdp_output_create(void)
{
E_Rdp_Output *output = NULL;
+ Eina_List *l;
+ E_Output_Mode *emode = NULL;
+ Eina_Bool mode = EINA_FALSE;
output = E_NEW(E_Rdp_Output, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
output->primary_output = e_output_find_by_index(0);
+ EINA_LIST_FOREACH(output->primary_output->info.modes, l, emode)
+ {
+ if (emode->current)
+ {
+ output->w = emode->w / 2;
+ output->h = emode->h / 2;
+ mode = EINA_TRUE;
+ break;
+ }
+ }
+ if (mode == EINA_FALSE)
+ {
+ output->w = E_RDP_WIDTH;
+ output->h = E_RDP_HEIGHT;
+ }
+
wl_list_init(&output->peers);
return output;