apprt/gtk: make sure noop winproto never initializes

This commit is contained in:
Mitchell Hashimoto
2025-01-10 12:10:26 -08:00
parent 2f81c360bd
commit d26c114b5d
3 changed files with 3 additions and 2 deletions

View File

@ -373,6 +373,7 @@ pub fn init(core_app: *CoreApp, opts: Options) !App {
&config,
);
errdefer winproto_app.deinit(core_app.alloc);
log.debug("windowing protocol={s}", .{@tagName(winproto_app)});
// This just calls the `activate` signal but its part of the normal startup
// routine so we just call it, but only if the config allows it (this allows

View File

@ -40,7 +40,7 @@ pub const App = union(Protocol) {
}
}
return .none;
return .{ .none = .{} };
}
pub fn deinit(self: *App, alloc: Allocator) void {

View File

@ -13,7 +13,7 @@ pub const App = struct {
_: [:0]const u8,
_: *const Config,
) !?App {
return .{};
return null;
}
pub fn deinit(self: *App, alloc: Allocator) void {