summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2016-08-23 19:30:19 (GMT)
committerfvogelnew1@free.fr <fvogel>2016-08-23 19:30:19 (GMT)
commit15fba41498aae127b829f7abd199235b21096457 (patch)
tree4799b692c10ab3eadb7b4f855c5b7e4b73c1dd8c /tests
parent4b43d45f871450e142f18021bece991a8932e3ec (diff)
downloadtk-15fba41498aae127b829f7abd199235b21096457.zip
tk-15fba41498aae127b829f7abd199235b21096457.tar.gz
tk-15fba41498aae127b829f7abd199235b21096457.tar.bz2
Added non regression test case menu-38.1
Diffstat (limited to 'tests')
-rw-r--r--tests/menu.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/menu.test b/tests/menu.test
index aaadc86..a97aa25 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