Re: [PATCH xserver] os/inputthread: Ensure pollfd refreshing

2016-10-15 Thread Keith Packard
Mihail Konev writes: > When putting a device node into a poll-request list, do not overwrite a > "please-remove" element with the same fd, so that a closed device file > is ospoll_remove'd prior to being ospoll_add'ed. > > Before, the opposite order was possible, resulting in

[PATCH xserver] os/inputthread: Ensure pollfd refreshing

2016-10-15 Thread Mihail Konev
When putting a device node into a poll-request list, do not overwrite a "please-remove" element with the same fd, so that a closed device file is ospoll_remove'd prior to being ospoll_add'ed. Before, the opposite order was possible, resulting in ospoll_add considering the newly opened file being

[PATCH libXi] XListInputDevices: Do not modify ndevices in case of an error

2016-10-15 Thread Niels Ole Salscheider
Output parameters must only be modified if there is no error. Signed-off-by: Niels Ole Salscheider --- src/XListDev.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/XListDev.c b/src/XListDev.c index b2bad72..f4e37ba

[PATCH libXi v2] SizeClassInfo can return 0 even without an error

2016-10-15 Thread Niels Ole Salscheider
With this patch we catch the error case separately. Previously, it was not possible to distinguish between a size of 0 and an error. XListInputDevices assumed that a return value of 0 indicates an error and returned an error itself. This caused a crash in any application that uses Chromium since