GNOME Bugzilla – Bug 558644
Hotplugged mice not reconfigured
Last modified: 2008-10-31 18:06:27 UTC
Please describe the problem: gnome-settings-daemon's mouse plugin can configure button mappings and speeds for mouse devices. It does this only at startup and when the settings are changed. This is fine in older xservers, but not when using input-hotplug. With input-hotplug, X input devices actually appear and disappear as physical devices are plugged/unplugged. This can also happen on some hardware during suspend, or even just when the device goes idle (depending on how braindead the hardware is, I guess). When a new device appears, it has the default settings. g-s-d should know to configure new devices. Steps to reproduce: 1. Run GNOME in a modern xserver using input-hotplug (such as Ubuntu 8.10) 2. Use gnome-mouse-properties to request a left-handed button mapping. 3. Plug in a new mouse. Actual results: The new mouse is right-handed, while the old one remains left-handed. Expected results: Both mice should be left-handed. Does this happen every time? Yes Other information: I've a patch to fix this.
Created attachment 121721 [details] [review] make the mouse plugin listen for DevicePresence X events
Thanks for the patch. A few minor nitpicks: Please consistenly use + DevicePresence (display, xi_presence, class_presence); instead of + DevicePresence(display, xi_presence, class_presence); and + set_mouse_settings ((GsdMouseManager *) data); instead of + set_mouse_settings ((GsdMouseManager *)data); A more serious objection is that some of that code needs to be protected by HAVE_XINPUT. Plus, please use existing bugs where appropriate. *** This bug has been marked as a duplicate of 549267 ***