1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-03 19:51:03 +02:00

fix(custom): crash when clicking non-popup button

This commit is contained in:
Jake Stanger 2023-08-01 21:29:00 +01:00
parent 22ab33d194
commit 901a86caa4
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 9 additions and 2 deletions

View file

@ -43,7 +43,7 @@ impl CustomWidget for ButtonWidget {
ExecEvent {
cmd: exec.clone(),
args: None,
id: button.popup_id(),
id: button.try_popup_id().unwrap_or(usize::MAX), // may not be a popup button
}
);
});