Skip to content

Updating menu_handle title from within on_menu_event causes death spiral #5254

@nanodeath

Description

@nanodeath

I have the following code in my Tauri application:

tauri::Builder::default()
    .menu(menu)
    .on_menu_event(move |event| {
        match event.menu_item_id() {
            "alwaysontop" => {
                let _ = event.window().set_always_on_top(true);
                let _ = event.window().menu_handle().get_item(event.menu_item_id()).set_title("test");
            }

and the last let statement seems to throw my application into a Not Responding state.

Interestingly, the Webview part of the app continues to load successfully.

The end goal is to have a kind of "checkbox" menu item, where I insert a ✔️ into the menu item depending on the current "always on top" state.

Tauri 1.1.0, Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions