local function create_submenu()
local smenu = radical.context{}
smenu:add_item { text="Entry 1" }
smenu:add_item { text="Entry 2" }
return smenu
end
local menu = radical.context{}
menu:add_item { text="static submenu", sub_menu = create_submenu() }
menu:add_item { text="dynamic submenu", sub_menu = create_submenu }
widget:set_menu(menu, nil, 3)
If hovering the mouse on "static submenu" -> "dynamic submenu" -> "static submenu" each submenu is shown exactly when the cursor is on the corresponding menuitem and hidden afterwards - as expected.
However, if the mouse cursor leaves the main menu while the dynamic submenu is shown (for example going below, or to the left or even descending into the submenu entries), it stays open even until after other entries in the main menu are selected or the main menu is closed.
This behaviour does not occur for the static submenu, so I guess it is somehow due to not saving the previous submenu object. I didn't investigate further so far.
I checked that this is not due to my PR #46 but happens on current master as well.
Running awesome
awesome v4.2 (Human after all)
• Compiled against Lua 5.3.4 (running with Lua 5.3)
• D-Bus support: ✔
• execinfo support: ✔
• xcb-randr version: 1.5
• LGI version: 0.9.1
Hi,
take this simple example:
If hovering the mouse on "static submenu" -> "dynamic submenu" -> "static submenu" each submenu is shown exactly when the cursor is on the corresponding menuitem and hidden afterwards - as expected.
However, if the mouse cursor leaves the main menu while the dynamic submenu is shown (for example going below, or to the left or even descending into the submenu entries), it stays open even until after other entries in the main menu are selected or the main menu is closed.
This behaviour does not occur for the static submenu, so I guess it is somehow due to not saving the previous submenu object. I didn't investigate further so far.
I checked that this is not due to my PR #46 but happens on current master as well.
Running awesome