app: make GimpDeviceInfo more rubust against broken device listings717c183a3ef7da8db41b768d467f97f77dbab707
commit717c183a3ef7da8db41b768d467f97f77dbab707
authorMichael Natterer <mitch@gimp.org>
Mon, 20 Aug 2018 11:50:31 +0000 (20 13:50 +0200)
committerMichael Natterer <mitch@gimp.org>
Mon, 20 Aug 2018 18:02:19 +0000 (20 20:02 +0200)
tree105bd350dcedde0f1410bd60b9ec12d442ed6451
parent5d937a237b2b230343e40c768bdc31972ee8cfbc
app: make GimpDeviceInfo more rubust against broken device listings

gimp_device_info_set_device(): don't just bail out if a device with
the same name is added again, instead, simply continue and overwrite
the info's old device with the new one.

NOTE that this only happens if something is wrong on the USB or udev
or libinput or whatever side and the same device is present multiple
times. The only "safe" thing is to assume that devices listed earlier
are dead and dangling entities and that the last registered device is
the one actually delivering events.
app/widgets/gimpdeviceinfo.c