Skip to content

Commit

Permalink
guard Cell behind cfg macos
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars committed Jan 7, 2025
1 parent 3fe0a35 commit cc887d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wkwebview/class/wry_web_view_parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use objc2_foundation::NSRect;
use objc2_ui_kit::UIView as NSView;

pub struct WryWebViewParentIvars {
#[cfg(target_os = "macos")]
traffic_light_inset: Cell<Option<(f64, f64)>>,
}

Expand Down Expand Up @@ -64,6 +65,7 @@ impl WryWebViewParent {
let delegate = mtm
.alloc::<WryWebViewParent>()
.set_ivars(WryWebViewParentIvars {
#[cfg(target_os = "macos")]
traffic_light_inset: Default::default(),
});
unsafe { msg_send_id![super(delegate), init] }
Expand Down

0 comments on commit cc887d7

Please sign in to comment.