servers & kits: Rehabilitate app_server restart functionality.

* It's not really possible to distinguish between a first startup
   and a restart inside app_server itself. Due to the new BServer
   setup, the same port will still be used, too. So, change the
   messages sent to just "AppServerStarted".

 * Since the message is sent out much later than the port is created,
   by the time applications see it, the app_server may have already
   been started a while and applications may have connected to it.
   So, check if we really need to reconnect in BApplication before
   actually trying to do that.

 * BWindow now starts with updates disabled, so they must be
   enabled after reconnecting.

After this commit, basic app_server restart functionality works again;
it's restarted automatically by launch_daemon after dying or being killed
and applications automatically reconnect. However, some problems still
linger (e.g. Terminal doesn't always recreate its windows, colors
on the Desktop look wrong, missing desktop background image, etc.)
This commit is contained in:
Augustin Cavalier
2025-11-18 22:26:31 -05:00
parent fe8f88cff4
commit 49a92384f4
8 changed files with 28 additions and 39 deletions
+1 -2
View File
@@ -13,8 +13,7 @@
#include <Roster.h>
const int32 kMsgAppServerRestarted = 'ASRe';
const int32 kMsgRestartAppServer = 'ReAS';
const int32 kMsgAppServerStarted = '_ASt';
class BRoster::Private {