mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2025-01-10 02:51:32 +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() {
|
for i in 0..self.menus.len() {
|
||||||
if self.menus[i].menu_handle == handle.0 as windef::HMENU {
|
if self.menus[i].menu_handle == handle.0 as windef::HMENU {
|
||||||
unsafe {
|
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());
|
winuser::DrawMenuBar(self.window.unwrap());
|
||||||
}
|
}
|
||||||
self.menus.swap_remove(i);
|
self.menus.swap_remove(i);
|
||||||
|
|
Loading…
Reference in a new issue