summaryrefslogtreecommitdiffstats
path: root/tests/menu.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-08-29 15:45:52 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-08-29 15:45:52 (GMT)
commit90c4c48d503b36af10f59f641ebe3b411a6ede4d (patch)
tree4123650cd41e5798ca888a1354f77c01aefa63c3 /tests/menu.test
parent75dc833771a79448de7b39fc5c33e3dc03b03c7c (diff)
parent1873b2da08408228b8b139ed92785a2f9c048b3b (diff)
downloadtk-90c4c48d503b36af10f59f641ebe3b411a6ede4d.zip
tk-90c4c48d503b36af10f59f641ebe3b411a6ede4d.tar.gz
tk-90c4c48d503b36af10f59f641ebe3b411a6ede4d.tar.bz2
Fixed [fa32290898] - Can't dismiss ttk::menubutton menu until mouse has hovered over it
Diffstat (limited to 'tests/menu.test')
-rw-r--r--tests/menu.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/menu.test b/tests/menu.test
index 7931c66..8325e2b 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -3878,6 +3878,35 @@ test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup {
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