Package: gdk

Function gdk:surface-translate-coordinates

Lambda List

gdk:surface-translate-coordinates (from to x y)

Syntax

(gdk:surface-translate-coordinates from to x y) => xnew, ynew

Arguments

from -- a gdk:surface object for the origin surface
to -- a gdk:surface object for the target surface
x -- a number coerced to a double float for the x coordinate to translate
x -- a number coerced to a double float for the y coordinate to translate
xnew -- a double float for the result for the x coordinate
ynew -- a double float for the result for the y coordinate

Details

Translates the given coordinates from being relative to the from surface to being relative to the to surface. Note that this only works if to and from are popups or transient-for to the same toplevel (directly or indirectly).

The function returns nil, if the coordinates were not successfully translated.
 

See also

#2025-08-02