refactor(surface): on_surface_destroy now calls XCloseDisplay
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
6a6de539ae
commit
d672b25844
2 changed files with 2 additions and 1 deletions
|
@ -100,6 +100,7 @@ void System::on_surface_construct(entt::registry ®istry, entt::entity 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);
|
||||||
|
|
||||||
auto root_window = XDefaultRootWindow(display);
|
auto root_window = XDefaultRootWindow(display);
|
||||||
|
|
||||||
auto border_width = 0;
|
auto border_width = 0;
|
||||||
|
@ -188,6 +189,7 @@ void System::on_surface_destroy(entt::registry ®istry, entt::entity entity)
|
||||||
}
|
}
|
||||||
|
|
||||||
XDestroyWindow(display, window);
|
XDestroyWindow(display, window);
|
||||||
|
XCloseDisplay(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
void System::handle_events(SurfaceComponent &surface)
|
void System::handle_events(SurfaceComponent &surface)
|
||||||
|
|
|
@ -60,7 +60,6 @@ private:
|
||||||
|
|
||||||
void set_visibility(ecs::Entity surface_entity, bool visible);
|
void set_visibility(ecs::Entity surface_entity, bool visible);
|
||||||
|
|
||||||
|
|
||||||
Ref<ecs::Registry> m_registry;
|
Ref<ecs::Registry> m_registry;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue