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

Accessor of the slave device for the event. The gdk:event-source-device 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. The (setf gdk:event-source-device) function sets the slave device for the event.

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

2023-2-26