How can I make a window modal in a Catalyst app?

Viewed 100

Is there any way to make a window run as modal in a Mac Catalyst app? I have tried everything I could think of, including:

  • Detecting a window resigning key and calling makeKey on it again. Doesn't work.
  • Changing the windowLevel of the window. No effect.
  • Detecting when a window scene is not key and calling UIApplication.shared.requestSceneSessionActivation on that session. This one kind of works but I need to delay the call, which means the window is not key for a brief moment, and it also feels glitchy afterwards.
  • Using a Mac plugin to run NSApplication.shared.runModal(for: window) and NSApplication.shared.stopModal(). This one does make the window modal but it looks like it breaks some of the actions in the window, buttons stop working.
0 Answers
Related