WindowServer: Start TaskBar and Terminal after starting up

This removes the race condition from `start-gui` not starting
WindowServer fast enough and leading to the apps crashing as they
timeout while connecting to the server
This commit is contained in:
2026-08-22 16:05:54 +03:00
parent 4e9cfdde97
commit 315d8895a7
2 changed files with 17 additions and 5 deletions
Binary file not shown.
+17 -5
View File
@@ -244,6 +244,13 @@ int main()
}
}
auto config = parse_config();
WindowServer window_server(framebuffer, config.corner_radius);
if (config.background_image)
if (auto ret = window_server.set_background_image(BAN::move(config.background_image)); ret.is_error())
dwarnln("Could not set background image: {}", ret.error());
dprintln("Window server started");
if (access("/usr/bin/xbanan", X_OK) == 0)
@@ -257,12 +264,17 @@ int main()
}
}
auto config = parse_config();
if (fork() == 0)
{
execl("/usr/bin/TaskBar", "TaskBar", NULL);
exit(1);
}
WindowServer window_server(framebuffer, config.corner_radius);
if (config.background_image)
if (auto ret = window_server.set_background_image(BAN::move(config.background_image)); ret.is_error())
dwarnln("Could not set background image: {}", ret.error());
if (fork() == 0)
{
execl("/usr/bin/Terminal", "Terminal", NULL);
exit(1);
}
const auto get_current_us =
[]() -> uint64_t