xfreerdp: fix initialization when multitouch hardware is not present

This commit is contained in:
Marc-André Moreau 2013-05-15 11:39:28 -04:00
parent 0ee55ddcfe
commit 9229548cd7
2 changed files with 9 additions and 3 deletions

View File

@ -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)

View File

@ -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)