@@ -1142,7 +1142,7 @@ tauri::Builder::default()
1142
1142
. map ( crate :: menu:: map_to_menu_theme)
1143
1143
. unwrap_or ( muda:: MenuTheme :: Auto ) ;
1144
1144
1145
- let _ = menu_. inner ( ) . init_for_hwnd_with_theme ( hwnd. 0 as _ , theme) ;
1145
+ let _ = unsafe { menu_. inner ( ) . init_for_hwnd_with_theme ( hwnd. 0 as _ , theme) } ;
1146
1146
}
1147
1147
#[ cfg( any(
1148
1148
target_os = "linux" ,
@@ -1183,7 +1183,7 @@ tauri::Builder::default()
1183
1183
self . run_on_main_thread ( move || {
1184
1184
#[ cfg( windows) ]
1185
1185
if let Ok ( hwnd) = window. hwnd ( ) {
1186
- let _ = menu. inner ( ) . remove_for_hwnd ( hwnd. 0 as _ ) ;
1186
+ let _ = unsafe { menu. inner ( ) . remove_for_hwnd ( hwnd. 0 as _ ) } ;
1187
1187
}
1188
1188
#[ cfg( any(
1189
1189
target_os = "linux" ,
@@ -1215,7 +1215,7 @@ tauri::Builder::default()
1215
1215
self . run_on_main_thread ( move || {
1216
1216
#[ cfg( windows) ]
1217
1217
if let Ok ( hwnd) = window. hwnd ( ) {
1218
- let _ = menu_. inner ( ) . hide_for_hwnd ( hwnd. 0 as _ ) ;
1218
+ let _ = unsafe { menu_. inner ( ) . hide_for_hwnd ( hwnd. 0 as _ ) } ;
1219
1219
}
1220
1220
#[ cfg( any(
1221
1221
target_os = "linux" ,
@@ -1243,7 +1243,7 @@ tauri::Builder::default()
1243
1243
self . run_on_main_thread ( move || {
1244
1244
#[ cfg( windows) ]
1245
1245
if let Ok ( hwnd) = window. hwnd ( ) {
1246
- let _ = menu_. inner ( ) . show_for_hwnd ( hwnd. 0 as _ ) ;
1246
+ let _ = unsafe { menu_. inner ( ) . show_for_hwnd ( hwnd. 0 as _ ) } ;
1247
1247
}
1248
1248
#[ cfg( any(
1249
1249
target_os = "linux" ,
@@ -1272,7 +1272,7 @@ tauri::Builder::default()
1272
1272
self . run_on_main_thread ( move || {
1273
1273
#[ cfg( windows) ]
1274
1274
if let Ok ( hwnd) = window. hwnd ( ) {
1275
- let _ = tx. send ( menu_. inner ( ) . is_visible_on_hwnd ( hwnd. 0 as _ ) ) ;
1275
+ let _ = tx. send ( unsafe { menu_. inner ( ) . is_visible_on_hwnd ( hwnd. 0 as _ ) } ) ;
1276
1276
}
1277
1277
#[ cfg( any(
1278
1278
target_os = "linux" ,
0 commit comments