[gimp/gimp-2-10] Issue #2495: many tablets broken by GIMP 2.10.8.



commit 96d67fd1b20ab1ef80948243630cca686742edb1
Author: Jehan <jehan girinstud io>
Date:   Fri Dec 7 00:01:07 2018 +0100

    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.
    
    (cherry picked from commit ce24e16083211f1b859a172d24306f7d834939b1)

 app/widgets/gimpdeviceinfo.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index c82340dafb..361cf35b79 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -518,16 +518,19 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
                   "which already has a device\n",
                   G_STRFUNC, gdk_device_get_name (device));
 
-      /*  don't bail out here, instead, simply continue and overwrite
-       *  the info's old device with the new one.
+      /*  We tried to simply continue and overwrite the info's old
+       *  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
        *  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.
+       *  present multiple times. Therefore there doesn't seem to be an
+       *  absolute single "solution" to this problem (well there is, but
+       *  probably not in GIMP, where we can only react). Nevertheless
+       *  experience taught us that bailing out may break less devices
+       *  (at the very least on Windows).
        */
+      return FALSE;
     }
   else if (! device && ! info->device)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]