Wrapped has_access in Option since it doesn't occur on all platforms. Similar to x11 fullscreen events..

main
isark 2 years ago
parent 24408eaa3f
commit 9c6d07e975

@ -18,7 +18,7 @@ pub struct Bounds {
pub enum UnderlayEvent { pub enum UnderlayEvent {
Attach { Attach {
bounds: Bounds, bounds: Bounds,
has_access: bool, has_access: Option<bool>,
is_fullscreen: Option<bool>, is_fullscreen: Option<bool>,
}, },
Detach, Detach,

@ -229,7 +229,7 @@ impl Runtime {
self.underlay_tx self.underlay_tx
.send(UnderlayEvent::Attach { .send(UnderlayEvent::Attach {
bounds, bounds,
has_access: true, has_access: None,
is_fullscreen: Some(is_fullscreen), is_fullscreen: Some(is_fullscreen),
}) })
.ok(); .ok();

@ -373,7 +373,7 @@ impl Runtime {
if let Some(bounds) = self.get_content_bounds() { if let Some(bounds) = self.get_content_bounds() {
self.underlay_tx 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(); .ok();
self.target.is_focused = true; self.target.is_focused = true;

Loading…
Cancel
Save