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:
Binary file not shown.
@@ -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");
|
dprintln("Window server started");
|
||||||
|
|
||||||
if (access("/usr/bin/xbanan", X_OK) == 0)
|
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 (fork() == 0)
|
||||||
if (config.background_image)
|
{
|
||||||
if (auto ret = window_server.set_background_image(BAN::move(config.background_image)); ret.is_error())
|
execl("/usr/bin/Terminal", "Terminal", NULL);
|
||||||
dwarnln("Could not set background image: {}", ret.error());
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const auto get_current_us =
|
const auto get_current_us =
|
||||||
[]() -> uint64_t
|
[]() -> uint64_t
|
||||||
|
|||||||
Reference in New Issue
Block a user