Compare commits

...

2 commits

Author SHA1 Message Date
963032617e
fix(surface): XDefaultRootWindow being called even if XOpenDisplay fails
Some checks failed
continuous-integration/drone/push Build is failing
2025-09-24 10:11:59 +03:30
55d68e3b71
refactor(renderer): fix clang-tidy checks in system tests 2025-09-24 10:08:48 +03:30
2 changed files with 5 additions and 7 deletions

View file

@ -6,9 +6,6 @@
using namespace lt;
using std::ignore;
using test::Case;
using test::expect_eq;
using test::expect_ne;
using test::expect_not_nullptr;
using test::expect_throw;
using test::expect_true;
using test::Suite;
@ -75,7 +72,7 @@ struct RendererContext
Suite raii = [] {
Case { "happy path won't throw" } = [&] {
std::ignore = create_system();
ignore = create_system();
};
Case { "happy path has no validation errors" } = [&] {
@ -91,7 +88,7 @@ Suite raii = [] {
auto stats = create_ref<app::SystemStats>();
expect_throw([&] {
std::ignore = System(
ignore = System(
{
.registry = {},
.surface_entity = surface_entity,
@ -101,7 +98,7 @@ Suite raii = [] {
});
expect_throw([&] {
std::ignore = System(
ignore = System(
System::CreateInfo {
.registry = surface_entity.get_registry(),
.surface_entity = empty_entity,
@ -111,7 +108,7 @@ Suite raii = [] {
});
expect_throw([&] {
std::ignore = System(
ignore = System(
System::CreateInfo {
.registry = surface_entity.get_registry(),
.surface_entity = surface_entity,

View file

@ -110,6 +110,7 @@ void System::on_surface_construct(ecs::Registry &registry, ecs::EntityId entity)
ensure(display_env != nullptr, "DISPLAY env var not found!");
auto *display = XOpenDisplay(display_env);
ensure(display, "Failed to open XDisplay with DISPLAY: {}", display_env);
auto root_window = XDefaultRootWindow(display);