On MacOS, CMD+Q should result in a soft exit, which can allow for user confirmation, rather than a hard exit. Setting the "apple.eawt.quitStrategy" property to "CLOSE_ALL_WINDOWS" accomplishes this. However, the property has to be set before the _AppEventHandler is initialized and reads that property, which happens when SwingUtilities.invokeLater() is first called in SplashScreen.java.
Setting the "apple.eawt.quitStrategy" property to "CLOSE_ALL_WINDOWS" results in a windowClosing event being sent to each JFrame. If any of them handle that by exiting, the program will exit. Otherwise, the program will continue as if CMD+Q was not entered. The current SplashScreen windowClosing handling is EXIT_ON_CLOSE, so change it to DO_NOTHING_ON_CLOSE.
May require the setDefaultCloseOperation change from https://github.com/runelite/runelite/pull/14539.
Copying from that PR: