diff --git a/src/wkwebview/mod.rs b/src/wkwebview/mod.rs index 0ea0c0802..b985ecbc9 100644 --- a/src/wkwebview/mod.rs +++ b/src/wkwebview/mod.rs @@ -341,11 +341,10 @@ impl InnerWebView { webview.setAutoresizingMask(NSAutoresizingMaskOptions::NSViewMinYMargin); } else { // Auto-resize - let options = NSAutoresizingMaskOptions( - NSAutoresizingMaskOptions::NSViewHeightSizable.0 - | NSAutoresizingMaskOptions::NSViewWidthSizable.0, + webview.setAutoresizingMask( + NSAutoresizingMaskOptions::NSViewHeightSizable + | NSAutoresizingMaskOptions::NSViewWidthSizable, ); - webview.setAutoresizingMask(options); } // allowsBackForwardNavigation diff --git a/src/wkwebview/synthetic_mouse_events.rs b/src/wkwebview/synthetic_mouse_events.rs index fdf87a751..97c427313 100644 --- a/src/wkwebview/synthetic_mouse_events.rs +++ b/src/wkwebview/synthetic_mouse_events.rs @@ -113,10 +113,10 @@ unsafe fn create_js_mouse_event( x = x, y = y, detail = event.clickCount(), - ctrl_key = mods_flags.0 & NSControlKeyMask.0 == NSControlKeyMask.0, - alt_key = mods_flags.0 & NSAlternateKeyMask.0 == NSAlternateKeyMask.0, - shift_key = mods_flags.0 & NSShiftKeyMask.0 == NSShiftKeyMask.0, - meta_key = mods_flags.0 & NSCommandKeyMask.0 == NSCommandKeyMask.0, + ctrl_key = mods_flags.contains(NSControlKeyMask), + alt_key = mods_flags.contains(NSAlternateKeyMask), + shift_key = mods_flags.contains(NSShiftKeyMask), + meta_key = mods_flags.contains(NSCommandKeyMask), button = button, buttons = buttons, )