mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-20 12:01:34 +00:00
various fixes for macos
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
const Window = @This();
|
||||
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const assert = std.debug.assert;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Grid = @import("Grid.zig");
|
||||
@@ -55,6 +56,7 @@ pub fn create(alloc: Allocator, loop: libuv.Loop) !*Window {
|
||||
.context_version_minor = 3,
|
||||
.opengl_profile = .opengl_core_profile,
|
||||
.opengl_forward_compat = true,
|
||||
.cocoa_graphics_switching = builtin.os.tag == .macos,
|
||||
});
|
||||
errdefer window.destroy();
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ fn threadMain(self: *Embed) void {
|
||||
.macos, .dragonfly, .freebsd, .openbsd, .netbsd => {
|
||||
var ts: std.os.timespec = .{
|
||||
.tv_sec = @divTrunc(timeout, 1000),
|
||||
.tv_nsec = @mod(timeout, 1000) * 1000,
|
||||
.tv_nsec = @mod(timeout, 1000) * 1000000,
|
||||
};
|
||||
|
||||
var ev: [0]std.os.Kevent = undefined;
|
||||
|
||||
Reference in New Issue
Block a user