diff --git a/src/core/Linux.zig b/src/core/Linux.zig index de93d829..4908f02d 100644 --- a/src/core/Linux.zig +++ b/src/core/Linux.zig @@ -133,17 +133,6 @@ pub fn initWindow( try warnAboutIncompleteFeatures(desired_backend, &MISSING_FEATURES_X11, &MISSING_FEATURES_WAYLAND, core.allocator); } -// pub fn deinit(linux: *Linux) void { -// if (linux.gamemode != null and linux.gamemode.?) deinitLinuxGamemode(); -// -// linux.allocator.free(linux.title); -// -// switch (linux.backend) { -// .wayland => linux.backend.wayland.deinit(linux), -// .x11 => linux.backend.x11.deinit(linux), -// } -// } - pub fn update(linux: *Linux) !void { switch (linux.backend) { .wayland => try linux.backend.wayland.update(linux), diff --git a/src/core/linux/Wayland.zig b/src/core/linux/Wayland.zig index 288eb440..9844c1b9 100644 --- a/src/core/linux/Wayland.zig +++ b/src/core/linux/Wayland.zig @@ -209,13 +209,6 @@ pub fn initWindow( try core.initWindow(window_id); } -// pub fn deinit( -// wl: *Wayland, -// linux: *Linux, -// ) void { -// linux.allocator.destroy(wl.surface_descriptor); -// } - pub fn tick(window_id: mach.ObjectID) !void { const wl = &core_ptr.windows.getValue(window_id).native.?.wayland; diff --git a/src/core/linux/X11.zig b/src/core/linux/X11.zig index 8189c68d..45264768 100644 --- a/src/core/linux/X11.zig +++ b/src/core/linux/X11.zig @@ -217,36 +217,6 @@ pub fn initWindow( try core.initWindow(window_id); } -// pub fn deinit( -// x11: *X11, -// linux: *Linux, -// ) void { -// linux.allocator.destroy(x11.surface_descriptor); -// for (x11.cursors) |cur| { -// if (cur) |_| { -// // _ = x11.libx11.XFreeCursor(x11.display, cur.?); -// } -// } -// if (x11.libxcursor) |*libxcursor| { -// libxcursor.handle.close(); -// } -// if (x11.libxrr) |*libxrr| { -// libxrr.handle.close(); -// } -// if (x11.libgl) |*libgl| { -// if (x11.gl_ctx) |gl_ctx| { -// libgl.glXDestroyContext(x11.display, gl_ctx); -// } -// libgl.handle.close(); -// } -// _ = x11.libx11.XUnmapWindow(x11.display, x11.window); -// _ = x11.libx11.XDestroyWindow(x11.display, x11.window); -// _ = x11.libx11.XCloseDisplay(x11.display); -// x11.libx11.handle.close(); -// std.posix.close(x11.empty_event_pipe[0]); -// std.posix.close(x11.empty_event_pipe[1]); -// } - // Called on the main thread pub fn tick(window_id: mach.ObjectID) !void { var core_window = core_ptr.windows.getValue(window_id);