since: 3.0

Declaration [src]

gdk_event_get_source_device (
  const GdkEvent* event

Description [src]

This function returns the hardware (slave) GdkDevice that has triggered the event, falling back to the virtual (master) device (as in gdk_event_get_device()) if the event wasn’t caused by interaction with a hardware device. This may happen for example in synthesized crossing events after a GdkWindow updates its geometry or a grab is acquired/released.

If the event does not contain a device field, this function will return NULL.

Available since: 3.0

Return value

Type: GdkDevice

A GdkDevice, or NULL.

The data is owned by the instance.
The return value can be NULL.