Comment 40 for bug 334800

Jon A. Cruz (jon-joncruz) wrote :

It would probably be good to use g_utf8_validate() to test the reported name instead of the current hard-coded check.

The GdkDevice's "source" member can be checked for the GdkInputSource values. When "broken", constructing a name that includes the source, has_cursor, and num_axes combined will be quite useful. Constructing a name in this manner will allow for identifying the parts of a stylus, etc.

Base names can start as:

GDK_SOURCE_MOUSE "Core Pointer", "pointer"

(where cursor is the puck, or mouse-like accessory for a tablet).

"Core pointer" is the default mouse, and "pointer" often shows up for a trackpad (these might operate as one). Mouse devices should usually be working. Those other names could be used for the first instance of each type that is reported, with additional devices of the same type having the additions appended.