From 9c6d07e975b5ff360bc94e69ae85c745280fc668 Mon Sep 17 00:00:00 2001 From: isark Date: Sun, 9 Jul 2023 20:41:41 +0200 Subject: [PATCH] Wrapped has_access in Option since it doesn't occur on all platforms. Similar to x11 fullscreen events.. --- src/lib.rs | 2 +- src/linux/mod.rs | 2 +- src/windows/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6530031..607d47c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ pub struct Bounds { pub enum UnderlayEvent { Attach { bounds: Bounds, - has_access: bool, + has_access: Option, is_fullscreen: Option, }, Detach, diff --git a/src/linux/mod.rs b/src/linux/mod.rs index 96031db..ae05930 100644 --- a/src/linux/mod.rs +++ b/src/linux/mod.rs @@ -229,7 +229,7 @@ impl Runtime { self.underlay_tx .send(UnderlayEvent::Attach { bounds, - has_access: true, + has_access: None, is_fullscreen: Some(is_fullscreen), }) .ok(); diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 5845332..b93199e 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -373,7 +373,7 @@ impl Runtime { if let Some(bounds) = self.get_content_bounds() { self.underlay_tx - .send(UnderlayEvent::Attach { bounds, has_access, is_fullscreen: None }) + .send(UnderlayEvent::Attach { bounds, has_access: Some(has_access), is_fullscreen: None }) .ok(); self.target.is_focused = true;