Tk Source Code

Artifact [8fc41fd4]
Login

Artifact 8fc41fd40834b1f2e3244dc09bbf76c8e88d92a788b39a885a5625e02dd460b7:

Attachment "exercise.tcl" to ticket [591829e9] added by erikleunissen 2026-02-15 14:49:33.
if {[lindex $argv 0] eq "getPointerWin"} {
    package require Tk
    # Determine the pointer window before the Tk root window is mapped.
    puts "|[winfo containing [winfo pointerx .] [winfo pointery .]]|"
    exit
}

# Move the screen pointer to the position on the screen where Tk displays
# the root window.
package require Tk
update
event generate . <Motion> -warp 1 -x 50 -y 50
after 10; update
puts [exec [info nameofexecutable] exercise.tcl getPointerWin]
exit