GNOME Bugzilla – Bug 770716
gdk_device_get_source for Microsoft Sculpt Comfort Bluetooth Mouse returns GDK_SOURCE_TOUCHSCREEN
Last modified: 2018-05-02 17:27:50 UTC
We use gdk_device_get_source to detect touchscreen device. But GDK detects ""Microsoft Microsoft® 2.4GHz Transceiver v9.0" (Microsoft Sculpt Comfort Bluetooth Mouse) as touch screen device. "Microsoft Microsoft® 2.4GHz Transceiver v9.0" shouldn't return touch screen device. Into gdb, Thread 1 "firefox" hit Breakpoint 1, gdk_device_get_source ( device=device@entry=0x7ffff6b56e80) at ././gdk/gdkdevice.c:822 822 in ././gdk/gdkdevice.c (gdb) p *device $10 = {parent_instance = {g_type_instance = {g_class = 0x7ffff6b5faa0}, ref_count = 3, qdata = 0x0}, name = 0x7fffe591e1f0 "Microsoft Microsoft® 2.4GHz Transceiver v9.0", source = GDK_SOURCE_TOUCHSCREEN, mode = GDK_MODE_DISABLED, has_cursor = 0, num_keys = 0, keys = 0x0, manager = 0x7fffe591c0b0, display = 0x7fffe59100b0, associated = 0x7ffff6b56980, slaves = 0x0, type = GDK_DEVICE_TYPE_SLAVE, axes = 0x7fffe591e130, num_touches = 0, vendor_id = 0x7ffff6bb4388 "045e", product_id = 0x7ffff6bb4390 "07a5", seat = 0x7ffff6bd28c0} Also, xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v9.0 id=9 [slave pointer (2)] ⎜ ↳ Microsoft Microsoft® 2.4GHz Transceiver v9.0 id=10 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ Microsoft Microsoft® 2.4GHz Transceiver v9.0 id=8 [slave keyboard (3)] ↳ Eee PC WMI hotkeys id=11 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)] ↳ Microsoft Microsoft® 2.4GHz Transceiver v9.0 id=13 [slave keyboard (3)]
hrm, I guess we need to extend the horrible heuristics we have for this by another entry.
Carlos, do you have such a mouse ? Can you come up with a patch ?
I don't have any similar mouse... to the reporter, I would greatly appreciate if you provided the "xinput list <device-id>" and "xinput list-props <device-id>" for this mouse.
list ==== ~$ DISPLAY=:1 xinput list 9 Microsoft Microsoft® 2.4GHz Transceiver v9.0 id=9 [slave pointer (2)] Reporting 7 classes: Class originated from: 9. Type: XIButtonClass Buttons supported: 9 Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" "Button Side" "Button Extra" Button state: Class originated from: 9. Type: XIValuatorClass Detail for Valuator 0: Label: Rel X Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 9. Type: XIValuatorClass Detail for Valuator 1: Label: Rel Y Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 9. Type: XIValuatorClass Detail for Valuator 2: Label: Rel Horiz Scroll Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 9. Type: XIValuatorClass Detail for Valuator 3: Label: Rel Vert Scroll Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 9. Type: XIScrollClass Scroll info for Valuator 2 type: 2 (horizontal) increment: 15.000000 flags: 0x0 Class originated from: 9. Type: XIScrollClass Scroll info for Valuator 3 type: 1 (vertical) increment: 15.000000 flags: 0x0 ~$ DISPLAY=:1 xinput list 10 Microsoft Microsoft® 2.4GHz Transceiver v9.0 id=10 [slave pointer (2)] This device is disabled Reporting 7 classes: Class originated from: 10. Type: XIButtonClass Buttons supported: 7 Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" Button state: Class originated from: 10. Type: XIValuatorClass Detail for Valuator 0: Label: Abs X Range: 0.000000 - 65535.000000 Resolution: 0 units/m Mode: absolute Current value: 0.000000 Class originated from: 10. Type: XIValuatorClass Detail for Valuator 1: Label: Abs Y Range: 0.000000 - 65535.000000 Resolution: 0 units/m Mode: absolute Current value: 0.000000 Class originated from: 10. Type: XIValuatorClass Detail for Valuator 2: Label: Rel Horiz Scroll Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 10. Type: XIValuatorClass Detail for Valuator 3: Label: Rel Vert Scroll Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 10. Type: XIScrollClass Scroll info for Valuator 2 type: 2 (horizontal) increment: 15.000000 flags: 0x0 Class originated from: 10. Type: XIScrollClass Scroll info for Valuator 3 type: 1 (vertical) increment: 15.000000 flags: 0x0 list-props ========== ~$ xinput list-props 9 Device 'Microsoft Microsoft® 2.4GHz Transceiver v9.0': Device Enabled (150): 1 Coordinate Transformation Matrix (152): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Accel Speed (285): 0.000000 libinput Accel Speed Default (286): 0.000000 libinput Accel Profiles Available (287): 1, 1 libinput Accel Profile Enabled (288): 1, 0 libinput Accel Profile Enabled Default (289): 1, 0 libinput Natural Scrolling Enabled (290): 0 libinput Natural Scrolling Enabled Default (291): 0 libinput Send Events Modes Available (269): 1, 0 libinput Send Events Mode Enabled (270): 0, 0 libinput Send Events Mode Enabled Default (271): 0, 0 libinput Left Handed Enabled (292): 0 libinput Left Handed Enabled Default (293): 0 libinput Scroll Methods Available (294): 0, 0, 1 libinput Scroll Method Enabled (295): 0, 0, 0 libinput Scroll Method Enabled Default (296): 0, 0, 0 libinput Button Scrolling Button (297): 2 libinput Button Scrolling Button Default (298): 274 libinput Middle Emulation Enabled (299): 0 libinput Middle Emulation Enabled Default (300): 0 Device Node (272): "/dev/input/event2" Device Product ID (273): 1118, 1957 libinput Drag Lock Buttons (301): <no items> libinput Horizonal Scroll Enabled (274): 1 ~$ xinput list-props 10 Device 'Microsoft Microsoft® 2.4GHz Transceiver v9.0': Device Enabled (150): 0 Coordinate Transformation Matrix (152): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Calibration Matrix (304): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Calibration Matrix Default (305): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Natural Scrolling Enabled (290): 0 libinput Natural Scrolling Enabled Default (291): 0 libinput Send Events Modes Available (269): 1, 0 libinput Send Events Mode Enabled (270): 0, 0 libinput Send Events Mode Enabled Default (271): 0, 0 Device Node (272): "/dev/input/event3" Device Product ID (273): 1118, 1957 libinput Drag Lock Buttons (301): <no items> libinput Horizonal Scroll Enabled (274): 1
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/664.