refactor(surface): on_surface_destroy now calls XCloseDisplay
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
light7734 2025-09-18 20:02:25 +03:30
parent 6a6de539ae
commit d672b25844
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
2 changed files with 2 additions and 1 deletions

View file

@ -100,6 +100,7 @@ void System::on_surface_construct(entt::registry &registry, entt::entity entity)
ensure(display_env != nullptr, "DISPLAY env var not found!");
auto *display = XOpenDisplay(display_env);
auto root_window = XDefaultRootWindow(display);
auto border_width = 0;
@ -188,6 +189,7 @@ void System::on_surface_destroy(entt::registry &registry, entt::entity entity)
}
XDestroyWindow(display, window);
XCloseDisplay(display);
}
void System::handle_events(SurfaceComponent &surface)

View file

@ -60,7 +60,6 @@ private:
void set_visibility(ecs::Entity surface_entity, bool visible);
Ref<ecs::Registry> m_registry;
};