fix(surface): XDefaultRootWindow being called even if XOpenDisplay fails
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
light7734 2025-09-24 10:11:59 +03:30
parent 55d68e3b71
commit 963032617e
Signed by: light7734
GPG key ID: 8C30176798F1A6BA

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!"); ensure(display_env != nullptr, "DISPLAY env var not found!");
auto *display = XOpenDisplay(display_env); auto *display = XOpenDisplay(display_env);
ensure(display, "Failed to open XDisplay with DISPLAY: {}", display_env);
auto root_window = XDefaultRootWindow(display); auto root_window = XDefaultRootWindow(display);