This function can be used to find out the XInput2 device ID behind a GdkDevice, mostly useful when you need to interact with say Clutter, or raw libXi calls.