aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/inspector/widgets/surface.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/inspector/widgets/surface.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/inspector/widgets/surface.zig')
-rw-r--r--vendor/libghostty-vt/src/inspector/widgets/surface.zig13
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/libghostty-vt/src/inspector/widgets/surface.zig b/vendor/libghostty-vt/src/inspector/widgets/surface.zig
index a630bad8..a23aebf0 100644
--- a/vendor/libghostty-vt/src/inspector/widgets/surface.zig
+++ b/vendor/libghostty-vt/src/inspector/widgets/surface.zig
@@ -9,6 +9,7 @@ const input = @import("../../input.zig");
const renderer = @import("../../renderer.zig");
const terminal = @import("../../terminal/main.zig");
const Surface = @import("../../Surface.zig");
+const global = @import("../../global.zig");
/// This is discovered via the hardcoded string in the ImGui demo window.
const window_imgui_demo = "Dear ImGui Demo";
@@ -46,7 +47,7 @@ pub const Inspector = struct {
pub fn draw(
self: *Inspector,
- surface: *const Surface,
+ surface: *Surface,
mouse: Mouse,
) void {
// Create our dockspace first. If we had to setup our dockspace,
@@ -56,8 +57,8 @@ pub const Inspector = struct {
// Draw everything that requires the terminal state mutex.
{
- surface.renderer_state.mutex.lock();
- defer surface.renderer_state.mutex.unlock();
+ surface.renderer_state.mutex.lockUncancelable(global.io());
+ defer surface.renderer_state.mutex.unlock(global.io());
const t = surface.renderer_state.terminal;
// Terminal info window
@@ -110,7 +111,7 @@ pub const Inspector = struct {
defer cimgui.c.ImGui_End();
if (open) {
self.vt_stream.draw(
- surface.alloc,
+ surface,
&t.colors.palette.current,
);
}
@@ -442,7 +443,7 @@ fn mouseTable(
if (state != .press) continue;
const button: input.MouseButton = @enumFromInt(i);
cimgui.c.ImGui_SameLine();
- cimgui.c.ImGui_Text("%s", (switch (button) {
+ cimgui.c.ImGui_Text("%s", @as([*]const u8, @ptrCast(switch (button) {
.unknown => "?",
.left => "L",
.middle => "M",
@@ -455,7 +456,7 @@ fn mouseTable(
.nine => "{9}",
.ten => "{10}",
.eleven => "{11}",
- }).ptr);
+ })));
}
}
}