@@ -33,7 +33,7 @@ public struct EnvironmentValues {
3333
3434 /// Called when a text field gets submitted (usually due to the user
3535 /// pressing Enter/Return).
36- public var onSubmit : ( ( ) -> Void ) ?
36+ public var onSubmit : ( @ MainActor ( ) -> Void ) ?
3737
3838 /// The scale factor of the current window.
3939 public var windowScaleFactor : Double
@@ -55,7 +55,7 @@ public struct EnvironmentValues {
5555 /// change and end up changing size. Each view graph node sets its own
5656 /// handler when passing the environment on to its children, setting up
5757 /// a bottom-up update chain up which resize events can propagate.
58- var onResize : ( _ newSize: ViewSize ) -> Void
58+ var onResize : @ MainActor ( _ newSize: ViewSize ) -> Void
5959
6060 /// The style of list to use.
6161 package var listStyle : ListStyle
@@ -74,6 +74,7 @@ public struct EnvironmentValues {
7474
7575 /// Brings the current window forward, not guaranteed to always bring
7676 /// the window to the top (due to focus stealing prevention).
77+ @MainActor
7778 func bringWindowForward( ) {
7879 func activate< Backend: AppBackend > ( with backend: Backend ) {
7980 backend. activate ( window: window as! Backend . Window )
@@ -140,6 +141,7 @@ public struct EnvironmentValues {
140141 ///
141142 /// `nil` on platforms that don't support revealing files, e.g.
142143 /// iOS.
144+ @MainActor
143145 public var revealFile : RevealFileAction ? {
144146 return RevealFileAction (
145147 backend: backend
0 commit comments