core: implement Linux.setTitle()

This commit is contained in:
Joshua Holmes 2024-11-19 19:36:51 -08:00 committed by Emi Gutekanst
parent ae1d49b51a
commit 15c63e8334
3 changed files with 27 additions and 13 deletions

View file

@ -265,6 +265,10 @@ pub fn update(x11: *X11, linux: *Linux) !void {
x11.core.input.tick();
}
pub fn setTitle(x11: *X11, title: [:0]const u8) void {
_ = x11.libx11.XStoreName(x11.display, x11.window, title);
}
const LibX11 = struct {
handle: std.DynLib,
XInitThreads: *const @TypeOf(c.XInitThreads),