Execute frame_timer when called input synchronize event function 20/271420/1
authorJunkyeong, Kim <jk0430.kim@samsung.com>
Mon, 21 Feb 2022 04:06:55 +0000 (13:06 +0900)
committerJunkyeong, Kim <jk0430.kim@samsung.com>
Mon, 21 Feb 2022 04:06:58 +0000 (13:06 +0900)
Change-Id: Iff31864ad67c00c1f7ff9f5c2bd5e5bccc8b1fad
Signed-off-by: Junkyeong, Kim <jk0430.kim@samsung.com>
src/e_mod_rdp.c

index 81ae7b9..036ab8c 100644 (file)
@@ -1184,8 +1184,30 @@ e_rdp_suppress_output(rdpContext *context, BYTE allow, const RECTANGLE_16 *area)
 static BOOL
 e_rdp_input_synchronize_event(rdpInput *input, UINT32 flags)
 {
-   //To do
+   E_Rdp_Peer_Context *peerContext = (E_Rdp_Peer_Context *)input->context;
+   E_Rdp_Output *output = peerContext->rdpBackend->output;
+   E_Rdp_Backend *b = NULL;
+
    DBG("e_rdp_input_synchronize_event");
+
+   b = g_rdp_backend;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(b, FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(b->output, FALSE);
+
+   if (output != b->output)
+     return FALSE;
+
+   if (b->client_count == 0)
+     return TRUE;
+
+   if (!output->frame_timer)
+     {
+        output->refresh_count = 5;
+        output->frame_timer = ecore_timer_add(output->refresh_time, _e_rdp_frame_timer, output);
+     }
+   else
+     output->refresh_count = 5;
+
    return TRUE;
 }