Merge pull request #939 from Demonthos/disable-browser-shortcuts
Disable browser shortcut keys on windows
This commit is contained in:
1 file changed
+11
@@ -57,6 +57,17 @@ pub fn build(
|
|||||||
})
|
})
|
||||||
.with_web_context(&mut web_context);
|
.with_web_context(&mut web_context);
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
// Windows has a platform specific settings to disable the browser shortcut keys
|
||||||
|
use wry::webview::WebViewBuilderExtWindows;
|
||||||
|
webview = webview.with_browser_accelerator_keys(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// These are commented out because wry is currently broken in wry
|
||||||
|
// let mut web_context = WebContext::new(cfg.data_dir.clone());
|
||||||
|
// .with_web_context(&mut web_context);
|
||||||
|
|
||||||
for (name, handler) in cfg.protocols.drain(..) {
|
for (name, handler) in cfg.protocols.drain(..) {
|
||||||
webview = webview.with_custom_protocol(name, handler)
|
webview = webview.with_custom_protocol(name, handler)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user