mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Issue #2495: different code for Windows and Linux on duplicate devices.
After discussing with Mitch, it turn out commit717c183a3e
was fixing (or rather working around) actual issues of broken device/usb stack issues on Linux, as expected. Nevertheless on Windows, this broke in turn many tablets (see commitce24e16083
). Therefore we do a very ugly #ifdef to bail from duplicate devices on Windows whereas we continue on Linux. This fix and difference of behavior is completely empirical, rather than based on actual good logics, so that's quite annoying, but well… not much choice here. Also note that since we had no report of breakage on other OSes (such as macOS/BSD), at least that I know of, I let them with the Linux code path.
This commit is contained in:
parent
3e967ed02c
commit
74a7a5d3e2
1 changed files with 13 additions and 6 deletions
|
@ -618,19 +618,26 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
|
|||
"which already has a device\n",
|
||||
G_STRFUNC, gdk_device_get_name (device));
|
||||
|
||||
/* 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.
|
||||
#ifdef G_OS_WIN32
|
||||
/* This is a very weird/dirty difference we make between Win32 and
|
||||
* Linux. On Linux, we had breakage because of duplicate devices,
|
||||
* fixed by overwriting the info's old device (assuming it to be
|
||||
* dead) with the new one. Unfortunately doing this on Windows
|
||||
* too broke a lot of devices (which used to work with the old
|
||||
* way). 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. 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).
|
||||
* probably not in GIMP, where we can only react). This is more
|
||||
* of an experimenting-in-real-life kind of bug.
|
||||
* Also we had no clear report on macOS or BSD (AFAIK) of broken
|
||||
* tablets with any of the version of the code. So let's keep
|
||||
* these similar to Linux for now.
|
||||
*/
|
||||
return FALSE;
|
||||
#endif /* G_OS_WIN32 */
|
||||
}
|
||||
else if (! device && ! info->device)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue