mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 11:21:30 +11:00
fix: set byposition flag when removing menus (#304)
This commit is contained in:
parent
e4881e77f9
commit
c042d26ffd
|
@ -1087,7 +1087,11 @@ impl Window {
|
|||
for i in 0..self.menus.len() {
|
||||
if self.menus[i].menu_handle == handle.0 as windef::HMENU {
|
||||
unsafe {
|
||||
let _t = winuser::RemoveMenu(main_menu, i as minwindef::UINT, 0);
|
||||
let _t = winuser::RemoveMenu(
|
||||
main_menu,
|
||||
i as minwindef::UINT,
|
||||
winuser::MF_BYPOSITION,
|
||||
);
|
||||
winuser::DrawMenuBar(self.window.unwrap());
|
||||
}
|
||||
self.menus.swap_remove(i);
|
||||
|
|
Loading…
Reference in a new issue