After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 580761 - Listen to new pointer devices appearing
Listen to new pointer devices appearing
Status: RESOLVED INVALID
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2009-04-29 15:15 UTC by Bastien Nocera
Modified: 2009-05-08 00:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simples (820 bytes, patch)
2009-04-29 15:15 UTC, Bastien Nocera
rejected Details | Review

Description Bastien Nocera 2009-04-29 15:15:12 UTC
Patch from Ray Strode.
Comment 1 Bastien Nocera 2009-04-29 15:15:55 UTC
Created attachment 133571 [details] [review]
simples
Comment 2 Jens Granseuer 2009-04-29 18:37:44 UTC
Hm. If I remember correctly (have to dig at the bugs opened when this feature was added) DeviceAdded was used first, but led to non-ready devices being activated which in turn made gsd crash or something. DeviceAdded was subsequently changed to DeviceEnabled. Shouldn't all devices that get added also be enabled some time thereafter (ie. before actual use)?
Comment 3 Peter Hutterer 2009-05-08 00:19:48 UTC
The message those send is 
DeviceAdded/Removed: "there's a device present"
DeviceEnabled/Disabled: "this device may send events"

DeviceAdded is sent out once per device - when the device is added to the X
server (i.e. usually when it's plugged in)
DeviceRemoved is the same, but when it's removed.

DeviceEnabled is sent when the device is enabled and may send events. You'll
get a DeviceEnabled event once after a DeviceAdded, when you come back from
VT switch or when a client explicitly enables the device.
Likewise with a DeviceDisabled. A disabled device is still present but won't
send events.

Comment 4 Peter Hutterer 2009-05-08 00:24:31 UTC
i forgot to add - you don't have to care about DeviceAdded at all, since the device is useless unless it is enabled too.

The only exception is if you control which devices are enabled/disabled as well but that doesn't apply here (applying the settings to a disabled device is pointless).
Comment 5 Bastien Nocera 2009-05-08 00:26:01 UTC
So, just listening to DeviceEnabled is actually enough. n/m.