2 '\" Copyright (c) 1990-1993 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
5 '\" See the file "license.terms" for information on usage and redistribution
6 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 .TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures"
14 Tk_CoordsToWindow \- Find window containing a point
20 \fBTk_CoordsToWindow\fR(\fIrootX, rootY, tkwin\fR)
24 X-coordinate (in root window coordinates).
26 Y-coordinate (in root window coordinates).
27 .AP Tk_Window tkwin in
28 Token for window that identifies application.
33 \fBTk_CoordsToWindow\fR locates the window that contains a given point.
34 The point is specified in root coordinates with \fIrootX\fR and
35 \fIrootY\fR (if a virtual-root window manager is in use then
36 \fIrootX\fR and \fIrootY\fR are in the coordinate system of the
38 The return value from the procedure is a token for the window that
39 contains the given point.
40 If the point is not in any window, or if the containing window
41 is not in the same application as \fItkwin\fR, then NULL is
44 The containing window is decided using the same rules that determine
45 which window contains the mouse cursor: if a parent and a child both
46 contain the point then the child gets preference, and if two siblings
47 both contain the point then the highest one in the stacking order
48 (i.e. the one that's visible on the screen) gets preference.
51 containing, coordinates, root window