diff --git a/android-activity/src/game_activity/mod.rs b/android-activity/src/game_activity/mod.rs index ce0e4b4..ce30444 100644 --- a/android-activity/src/game_activity/mod.rs +++ b/android-activity/src/game_activity/mod.rs @@ -241,7 +241,7 @@ impl AndroidAppInner { MainEvent::RedrawNeeded {} } ffi::NativeAppGlueAppCmd_APP_CMD_CONTENT_RECT_CHANGED => { - MainEvent::ContentRectChanged + MainEvent::ContentRectChanged {} } ffi::NativeAppGlueAppCmd_APP_CMD_GAINED_FOCUS => { MainEvent::GainedFocus diff --git a/android-activity/src/lib.rs b/android-activity/src/lib.rs index 4759edc..99ffdb5 100644 --- a/android-activity/src/lib.rs +++ b/android-activity/src/lib.rs @@ -137,7 +137,8 @@ pub enum MainEvent<'a> { /// Command from main thread: the content area of the window has changed, /// such as from the soft input window being shown or hidden. You can /// get the new content rect by calling [`AndroidApp::content_rect()`] - ContentRectChanged, + #[non_exhaustive] + ContentRectChanged {}, /// Command from main thread: the app's activity window has gained /// input focus. diff --git a/android-activity/src/native_activity/mod.rs b/android-activity/src/native_activity/mod.rs index 24149e9..5faca83 100644 --- a/android-activity/src/native_activity/mod.rs +++ b/android-activity/src/native_activity/mod.rs @@ -245,7 +245,7 @@ impl AndroidAppInner { Some(MainEvent::RedrawNeeded {}) } ffi::APP_CMD_CONTENT_RECT_CHANGED => { - Some(MainEvent::ContentRectChanged) + Some(MainEvent::ContentRectChanged {}) } ffi::APP_CMD_GAINED_FOCUS => Some(MainEvent::GainedFocus), ffi::APP_CMD_LOST_FOCUS => Some(MainEvent::LostFocus),