Issue #2495: many tablets broken by GIMP 2.10.8.

We had many reports of tablets from various brands (Huion, Gaomon,
XP-Pen…) broken in the last release (though working fine when
downgrading to 2.10.6). Latest Huion drivers seem to fix the issue
(according to at least one report), but this is not the case for other
tablets.

Though unable to test myself, provided stderr logs indicate that we hit
the case when 2 devices with the same name are registered. Therefore
this commit is basically reverting commit 717c183a3e (though keeping and
completing the comments). I don't think there is an ultimate solution
here but with this regression, experience shows us there seem to be a
lot more breakage when overwriting the device with newer occurences (at
least on Windows). It is unclear though if commit 717c183a3e was also
supposed to fix another case actually encountered. If so, we will need
to get an even more advanced solution.
This commit is contained in:
Jehan 2018-12-07 00:01:07 +01:00
parent c9c2397b0d
commit ce24e16083

View file

@ -618,16 +618,19 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
"which already has a device\n", "which already has a device\n",
G_STRFUNC, gdk_device_get_name (device)); G_STRFUNC, gdk_device_get_name (device));
/* don't bail out here, instead, simply continue and overwrite /* We tried to simply continue and overwrite the info's old
* the info's old device with the new one. * device (assuming it to be dead) with the new one but this
* broke a lot of devices. See the regression bug #2495.
* *
* NOTE that this only happens if something is wrong on the USB * NOTE that this only happens if something is wrong on the USB
* or udev or libinput or whatever side and the same device is * or udev or libinput or whatever side and the same device is
* present multiple times. The only "safe" thing is to assume * present multiple times. Therefore there doesn't seem to be an
* that devices listed earlier are dead and dangling entities * absolute single "solution" to this problem (well there is, but
* and that the last registered device is the one actually * probably not in GIMP, where we can only react). Nevertheless
* delivering events. * experience taught us that bailing out may break less devices
* (at the very least on Windows).
*/ */
return FALSE;
} }
else if (! device && ! info->device) else if (! device && ! info->device)
{ {