better surface messages

This commit is contained in:
Ashley Wulber 2024-12-31 17:18:49 -05:00
parent bd36d6bb8c
commit a406859e65
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
4 changed files with 256 additions and 196 deletions

View file

@ -2,7 +2,7 @@
pub mod token;
use crate::{
app::{self, iced_settings, Core},
app::{self, iced_settings, message::SurfaceMessageHandler, Core},
cctk::sctk,
iced::{
self,
@ -376,7 +376,10 @@ impl Context {
/// # Errors
///
/// Returns error on application failure.
pub fn run<App: Application>(flags: App::Flags) -> iced::Result {
pub fn run<App: Application>(flags: App::Flags) -> iced::Result
where
App::Message: SurfaceMessageHandler,
{
let helper = Context::default();
let mut settings = helper.window_settings();