Skip to content

Commit f111387

Browse files
feat: check and sync late set menu state
close #331 close #327 close #320
1 parent 6648aaa commit f111387

6 files changed

Lines changed: 562 additions & 14 deletions

File tree

src/shell/contextmenu/contextmenu.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ menu menu::construct_with_hmenu(
291291
}
292292

293293
m.parent_window = hWnd;
294+
m.native_handle = hMenu;
294295
m.is_top_level = is_top;
295296
return m;
296297
}

src/shell/contextmenu/contextmenu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct menu_render;
1616
struct menu {
1717
std::vector<menu_item> items;
1818
void *parent_window = nullptr;
19+
void *native_handle = nullptr;
1920
bool is_top_level = false;
2021

2122
static menu
@@ -56,4 +57,4 @@ struct menu_item {
5657
std::optional<std::string> name_resid;
5758
std::optional<std::string> origin_name;
5859
};
59-
} // namespace mb_shell
60+
} // namespace mb_shell

0 commit comments

Comments
 (0)