rust-windowing / winit

Window handling library in pure Rust

Home Page:https://docs.rs/winit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible solution to keep created surface consistent

ztlwk opened this issue · comments

commented

Description

Here's the idea:

  • Require the user to implement a "bridge" type, which owns the corresponding surface, and gets dropped and recreated by winit when being suspended in Android.
  • Make the "bridge" type or ApplicationHandler trait include the window recreation logic, so winit can recreate the window and own it, which assured the users to have a "window" in every update.

Relevant platforms

Android