sreeise / graph-rs-sdk

Microsoft Graph API Client And Identity Platform Client in Rust
MIT License
114 stars 30 forks source link

Possible Webview panic without `gtk::init` call #461

Open sreeise opened 9 months ago

sreeise commented 9 months ago

According to Wry docs the Webview will panic on Linux if gtk::init is not called. See WebViewBuilder::new docs. However, the linked Platform Considerations from Wry seem to state that this only happens when the windowing library doesn’t support gtk.

Current windowing library that we use is Tao. This ticket is to verify whether or not gtk::init needs ot be called and if so add the calls to the relevant places. Check if Tao already does this. If not, then we will need to add a call to gtk::init before the event loop and during each event loop call the following as shown in the Platform Considerations:

#[cfg(target_os = "linux")]
while gtk::events_pending() {
  gtk::main_iteration_do(false);
}