Tk Source Code

Check-in [ed41b6cd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge core-8-5-branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | bug-3216070
Files: files | file ages | folders
SHA1: ed41b6cd6a750e158c4d67e6d3bb6115d5b3bdd1
User & Date: jan.nijtmans 2011-03-17 14:38:38
Context
2011-03-17
14:38
merge core-8-5-branch Closed-Leaf check-in: ed41b6cd user: jan.nijtmans tags: bug-3216070
2011-03-16
23:47
[Bug 3181181] tearoff sub-menu windows not being shown on Windows.

Commit f59e9722e9 changed tearoff menu windows to be transient toolwindow toplevels. However the hidden menu hierarchy confuses the toplevel search when the menu being torn off is a submenu and not a direct child of the menubar. This patch fixes the search to exclude these hidden menu windows.

Signed-off-by: Pat Thoyts <[email protected]> check-in: 8c54d46c user: patthoyts tags: core-8-5-branch

22:13
bug-3216070 check-in: 0fc858d2 user: jan.nijtmans tags: bug-3216070
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/tearoff.tcl.

77
78
79
80
81
82
83





84
85
86
87
88
89
90
	    Menu {
	    	wm title $menu [$parent entrycget active -label]
	    }
	}
    }

    if {[tk windowingsystem] eq "win32"} {





	wm transient $menu [winfo toplevel $parent]
	wm attributes $menu -toolwindow 1
    }

    $menu post $x $y

    if {[winfo exists $menu] == 0} {







>
>
>
>
>







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	    Menu {
	    	wm title $menu [$parent entrycget active -label]
	    }
	}
    }

    if {[tk windowingsystem] eq "win32"} {
        # [Bug 3181181]: Find the toplevel window for the menu
        set parent [winfo toplevel $parent]
        while {[winfo class $parent] eq "Menu"} {
            set parent [winfo toplevel [winfo parent $parent]]
        }
	wm transient $menu [winfo toplevel $parent]
	wm attributes $menu -toolwindow 1
    }

    $menu post $x $y

    if {[winfo exists $menu] == 0} {