Package: gdk

Function gdk:event-source-device

Lambda List

gdk:event-source-device (event)

Syntax

(gdk:event-source-device event) => device
(setf (gdk:event-source-device event) device)

Arguments

event -- a gdk:event instance
device -- a gdk:device object

Details

Gets or sets the slave device for the event. This function returns the hardware (slave) device that has triggered the event, falling back to the virtual (master) device, as in the gdk:event-device function, if the event was not caused by interaction with a hardware device.

This may happen for example in synthesized crossing events after a gdk:window object updates its geometry or a grab is acquired/released.

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

The event must have been allocated by GTK, for instance by the gdk:event-copy function.
 

See also

2025-10-09