From: dyamy-lee Date: Thu, 20 Jan 2022 01:51:17 +0000 (+0900) Subject: e_mod_rdp : initialize virtual device for rdp_input and add deinit X-Git-Tag: submit/tizen/20220128.060848~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F269656%2F5;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-rdp.git e_mod_rdp : initialize virtual device for rdp_input and add deinit Change-Id: I5eea2ba5500ea77c25a12319cd56dba9b2f82905 --- diff --git a/src/e_mod_rdp.c b/src/e_mod_rdp.c index 1f98180..0e52d29 100644 --- a/src/e_mod_rdp.c +++ b/src/e_mod_rdp.c @@ -30,12 +30,14 @@ #include #include #include +#include #include "e_mod_main.h" #include "e_mod_rdp.h" #define E_RDP_WIDTH 1280 #define E_RDP_HEIGHT 720 +#define E_RDP_DEVICE_NAME "rdp_input" #define E_MOD_RDP_CONFIG_VERSION 2 #define E_MOD_RDP_NAME_LEN 64 #define MAX_FREERDP_FDS 10 @@ -1136,6 +1138,8 @@ e_rdp_peer_init(freerdp_peer *client, E_Rdp_Backend *b) void *rfds[MAX_FREERDP_FDS]; int i, fd; struct wl_event_loop *loop; + char *device_name = NULL, *result = NULL; + unsigned int device_type = 0x0; rdpSettings *settings; rdpInput *input; E_Rdp_Peer_Context *peerCtx; @@ -1186,6 +1190,18 @@ e_rdp_peer_init(freerdp_peer *client, E_Rdp_Backend *b) client->update->SuppressOutput = (pSuppressOutput)e_rdp_suppress_output; + device_type = E_INPUT_SEAT_POINTER | E_INPUT_SEAT_TOUCH | E_INPUT_SEAT_KEYBOARD; + device_name = E_RDP_DEVICE_NAME; + result = e_info_server_input_init_device(device_type, device_name); + + if (e_util_strcmp(result, E_INFO_INPUT_RESULT_NONE)) + { + e_info_server_input_deinit_device(); + result = e_info_server_input_init_device(device_type, device_name); + } + + DBG("rdp peer init | init input device | result = %s\n", result); + input = client->input; input->SynchronizeEvent = e_rdp_input_synchronize_event; input->MouseEvent = e_rdp_mouse_event; @@ -1489,6 +1505,7 @@ conf_err: void e_mod_rdp_deinit(void) { + e_info_server_input_deinit_device(); e_rdp_backend_destroy(); if (g_rdp_config) {