Skip to content

Commit

Permalink
Hook up az_* event functions for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Feb 15, 2025
1 parent 2ef17dd commit fd18b56
Show file tree
Hide file tree
Showing 3 changed files with 1,136 additions and 319 deletions.
7 changes: 4 additions & 3 deletions azul-desktop/src/shell/appkit/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,17 @@ extern "C" fn menu_item_clicked(this: *mut Object, _sel: Sel, sender: *mut Objec
let ptr = &*ptr;
let windowid = *(*this).get_ivar::<i64>("windowid");

let cb = ptr.active_menus.values()
let mut app_borrow = ptr.data.lock().unwrap();
let mut app_borrow = &mut *app_borrow;

let cb = app_borrow.active_menus.values()
.find_map(|s| s.get(&CommandId(tag)));

let callback = match cb {
Some(s) => s,
None => return,
};

let mut app_borrow = ptr.data.lock().unwrap();

let mut ret = ProcessEventResult::DoNothing;
// let mut new_windows = Vec::new();
// let mut destroyed_windows = Vec::new();
Expand Down
Loading

0 comments on commit fd18b56

Please sign in to comment.