Tk Source Code

Check-in [03cfff45]
Login

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

Overview
Comment:Added non regression test case menu-38.1
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-fa32290898
Files: files | file ages | folders
SHA1: 03cfff459d7ce14a5bf6d63729a7729f03c843e2
User & Date: fvogel 2016-08-23 19:30:19
Context
2016-08-29
17:42
Constrained test menu-38.1 to Unix or Mac platforms since this test hangs on Windows and the corresponding bug was reported for Linux and Mac only Closed-Leaf check-in: 48054f96 user: fvogel tags: bug-fa32290898
15:45
Fixed [fa32290898] - Can't dismiss ttk::menubutton menu until mouse has hovered over it check-in: d4e1f680 user: fvogel tags: core-8-6-branch
2016-08-23
19:30
Added non regression test case menu-38.1 check-in: 03cfff45 user: fvogel tags: bug-fa32290898
2016-08-19
20:31
Fixed [fa32290898] - Can't dismiss ttk::menubutton menu until mouse has hovered over it check-in: 470cbe0b user: fvogel tags: bug-fa32290898
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/menu.test.

3873
3874
3875
3876
3877
3878
3879





























3880
3881
3882
3883
3884
3885
3886
    # On Linux the following used to panic
    # It now returns an error (on all platforms)
    menu .m -type menubar
    list [catch ".m post 1 1" msg] $msg
} -cleanup {
    destroy .m
} -result {1 {a menubar menu cannot be posted}}































# cleanup
imageFinish
deleteWindows
cleanupTests
return







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
    # On Linux the following used to panic
    # It now returns an error (on all platforms)
    menu .m -type menubar
    list [catch ".m post 1 1" msg] $msg
} -cleanup {
    destroy .m
} -result {1 {a menubar menu cannot be posted}}

test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over it - bug fa32290898} -setup {
} -body {
    toplevel .top
    ttk::menubutton .top.mb -text "Some menu";
    menu .top.mb.m;
    .top.mb.m add command -label "Item 1";
    .top.mb.m add command -label "Item 2";
    .top.mb configure -menu .top.mb.m;
    pack .top.mb
    update
    # simulate mouse click on the menubutton, which posts its menu
    event generate .top.mb <ButtonPress-1> -warp 1
    update
    after 50
    event generate .top.mb <ButtonRelease-1>
    update
    # simulate mouse click on the menu again, i.e. without
    # entering/leaving the posted menu
    event generate .top.mb <ButtonPress-1>
    update
    after 50
    event generate .top.mb <ButtonRelease-1>
    update
    # the menu shall have been unposted by the second click
    winfo ismapped .top.mb.m
} -cleanup {
    destroy .top.mb.m .top.m .top
} -result {0}


# cleanup
imageFinish
deleteWindows
cleanupTests
return