Bug 558644 - Hotplugged mice not reconfigured
Hotplugged mice not reconfigured
Status: RESOLVED DUPLICATE of bug 549267
Product: gnome-settings-daemon
Classification: Core
Component: plugins
2.24.x
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-10-31 09:00 UTC by William Grant
Modified: 2008-10-31 18:06 UTC (History)
0 users

See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
make the mouse plugin listen for DevicePresence X events (2.69 KB, patch)
2008-10-31 09:04 UTC, William Grant
needs-work Details | Diff | Review

Description William Grant 2008-10-31 09:00:34 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.
Comment 1 William Grant 2008-10-31 09:04:32 UTC
Created attachment 121721 [details] [review]
make the mouse plugin listen for DevicePresence X events
Comment 2 Jens Granseuer 2008-10-31 18:06:27 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.