mirror of https://github.com/FreeRDP/FreeRDP
xfreerdp: fix initialization when multitouch hardware is not present
This commit is contained in:
parent
0ee55ddcfe
commit
9229548cd7
|
@ -692,11 +692,15 @@ BOOL freerdp_channels_get_fds(rdpChannels* channels, freerdp* instance, void** r
|
|||
|
||||
void* freerdp_channels_get_static_channel_interface(rdpChannels* channels, const char* name)
|
||||
{
|
||||
void* pInterface = NULL;
|
||||
CHANNEL_OPEN_DATA* pChannelOpenData;
|
||||
|
||||
pChannelOpenData = freerdp_channels_find_channel_open_data_by_name(channels, name);
|
||||
|
||||
return pChannelOpenData->pInterface;
|
||||
if (pChannelOpenData)
|
||||
pInterface = pChannelOpenData->pInterface;
|
||||
|
||||
return pInterface;
|
||||
}
|
||||
|
||||
HANDLE freerdp_channels_get_event_handle(freerdp* instance)
|
||||
|
|
|
@ -68,6 +68,7 @@ int xf_input_init(xfInfo* xfi, Window window)
|
|||
BYTE masks[8][XIMaskLen(XI_LASTEVENT)];
|
||||
|
||||
nmasks = 0;
|
||||
ndevices = 0;
|
||||
active_contacts = 0;
|
||||
ZeroMemory(contacts, sizeof(touchContact) * MAX_CONTACTS);
|
||||
|
||||
|
@ -123,9 +124,10 @@ int xf_input_init(xfInfo* xfi, Window window)
|
|||
}
|
||||
}
|
||||
|
||||
xstatus = XISelectEvents(xfi->display, window, evmasks, nmasks);
|
||||
if (nmasks > 0)
|
||||
xstatus = XISelectEvents(xfi->display, window, evmasks, nmasks);
|
||||
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL xf_input_is_duplicate(XIDeviceEvent* event)
|
||||
|
|
Loading…
Reference in New Issue