Skip to content

Commit

Permalink
fix(linux): add cfg for attach_inpsector_handlers to fix release buil…
Browse files Browse the repository at this point in the history
…ds (#1185)
  • Loading branch information
amrbashir authored Mar 6, 2024
1 parent 3a2026b commit 549c663
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ use raw_window_handle::{HasWindowHandle, RawWindowHandle};
#[cfg(any(debug_assertions, feature = "devtools"))]
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Mutex};
#[cfg(any(debug_assertions, feature = "devtools"))]
use webkit2gtk::WebInspectorExt;
use webkit2gtk::{
AutoplayPolicy, InputMethodContextExt, LoadEvent, NavigationPolicyDecision,
NavigationPolicyDecisionExt, NetworkProxyMode, NetworkProxySettings, PolicyDecisionType,
PrintOperationExt, SettingsExt, URIRequest, URIRequestExt, UserContentInjectedFrames,
UserContentManagerExt, UserScript, UserScriptInjectionTime,
WebContextExt as Webkit2gtkWeContextExt, WebInspectorExt, WebView, WebViewExt,
WebsiteDataManagerExt, WebsiteDataManagerExtManual, WebsitePolicies,
WebContextExt as Webkit2gtkWeContextExt, WebView, WebViewExt, WebsiteDataManagerExt,
WebsiteDataManagerExtManual, WebsitePolicies,
};
use webkit2gtk_sys::{
webkit_get_major_version, webkit_get_micro_version, webkit_get_minor_version,
Expand Down Expand Up @@ -511,6 +513,7 @@ impl InnerWebView {
manager.register_script_message_handler("ipc");
}

#[cfg(any(debug_assertions, feature = "devtools"))]
fn attach_inspector_handlers(webview: &WebView) -> Arc<AtomicBool> {
let is_inspector_open = Arc::new(AtomicBool::default());
if let Some(inspector) = webview.inspector() {
Expand Down

0 comments on commit 549c663

Please sign in to comment.