Skip to content

about_to_show_menuitem unwrap method panic on vesktop item #5

@Levizor

Description

@Levizor

Panic:

thread 'main' panicked at src/main.rs:88:29:
called `Result::unwrap()` on an `Err` value: ZBus(MethodError(OwnedErrorName("org.freedesktop.DBus.Error.Failed"), Some("error occurred in AboutToShow"), Msg { type: Error, serial: 20, sender: UniqueName(":1.404"), reply-serial: 37, body: Str, fds: [] }))

Connected with #4 new code in main.rs

if let system_tray::client::Event::Update(dest, system_tray::client::UpdateEvent::Menu(_)) = update {
    // the TrayMenu exist means that the menu path must exist, i think.
    let menu_path = app.items.lock().unwrap().get(&dest).unwrap().0.menu.clone().unwrap();
    let _ = app.client.about_to_show_menuitem(
        dest,
        menu_path,
        0,
    ).await.unwrap();
 }

But why does it trigger on vesktop?
@ogios Did you happen to catch something like that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions