[DIGImend-users] Genius MousePen i608X Gimp 2.8RC1 issue
Brought to you by:
spb_nick
From: Viktoria S. <vik...@fr...> - 2012-04-17 10:08:42
|
Hi Nick and everybody! I have problem with Genius MousePen i608X driver and using it in Gimp 2.8RC1. The problem seems to be that in this model the name the pen and the mouse are the same. Usually if I have the mousepen plugged in during boot the first item is the pen and the second is the mouse, but if I plug the mousepen after boot the first item will be the mouse and the second will be the pen. I have compiled Gimp 2.8RC1 for myself and I get only one Genius MousePen i608X on the list. As you can see the screenshot in this post: http://ubuntuforums.org/showpost.php?p=11690680&postcount=30. I tried to figure out what can be the problem, since the earlier version of gimp does not have this issue (I have 2 Genius MousePen i608X there to choose from)(Nick earlier thought that the problem could be because the mouse works in absolute mode, but the absolute mouse works perfectly in earlier version of gimp so I thought probably that is not the issue.) So I browsed the code and I have found the code which is creating the device list of the panel: it is in gimp-2.8.0-RC1/app/widgets/gimpdevicemanager.c. In line 313 there is a function gimp_device_manager_device_added. static void gimp_device_manager_device_added (GdkDisplay *gdk_display, GdkDevice *device, GimpDeviceManager *manager) { GimpDeviceManagerPrivate *private = GET_PRIVATE (manager); GimpDeviceInfo *device_info; device_info = GIMP_DEVICE_INFO (gimp_container_get_child_by_name (GIMP_CONTAINER (manager), device->name)); /*if (device_info) { gimp_device_info_set_device (device_info, device, gdk_display); } else {*/ device_info = gimp_device_info_new (private->gimp, device, gdk_display); gimp_container_add (GIMP_CONTAINER (manager), GIMP_OBJECT (device_info)); g_object_unref (device_info); //} } The original code is without comments, and unfortunately it uses the name of the device as a key in a collection to identify the device. If I compile gimp with commented lines all of the devices appear on the list. But there are issues with this: - if I plugin the mousepen after bootup with the original gimp code only the mouse appears on the list, because, as I mentioned in that case the mouse will be the first item in xinput list not the pen. So in this scenario the pen can only be configured with the modified code. - if I were to configure both the mouse and the pen they are going to share the same settings (according color, brush etc.) somehow, I guess because the device name used as a key (In earlier version of the gimp the whole device handling code is different, so there are no such issues. If I configure to use both the pen and the mouse they are going to have defferent brush, color etc. settings.) So my question is: can we accept the kernel/evdev driver to provide unique name for the devices or not? Because if the device names are not required to be unique: there is bug in gimp because they should use the device name and the device type as a key in their device collection. And in that case I guess I'd better file a bug in gimp. But on the other hand: if the device names has to be unique, then there is a bug in the kernel/evdev driver. And in this case I would like to report a bug to Nick :-) Can somebody help with this? Thank you and regards: Viktoria S. |