Tk Library Source Code

View Ticket
Login
Ticket UUID: 1815027
Title: ::tooltip::show; wrong order of window checking
Type: Bug Version: None
Submitter: tombert Created on: 2007-10-17 10:16:36
Subsystem: tklib Assigned To: nobody
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2007-10-17 17:56:49
Resolution: None Closed By: tombert
    Closed on: 2007-10-17 10:56:49
Description:
The evaluation "{!$we || (!$wm && !$wc)}" if the window exists is to late:

-----------
set we [winfo exists $w]
set wc [string match $w* [eval [list winfo containing] \
                                  [winfo pointerxy $w]]]
set wm [string equal [winfo class $w] "Menu"]
if {!$we || (!$wm && !$wc)} {
   return
}
------------

It's after "[winfo pointerxy $w]" where it already crashes.

Should be:
-------------
set we [winfo exists $w]
if {!$we} {return}
set wc [string match $w* [eval [list winfo containing] \
                                  [winfo pointerxy $w]]]
set wm [string equal [winfo class $w] "Menu"]
if {!$wm && !$wc} {
    return
}
-------------