aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/apprt/gtk/winproto.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/apprt/gtk/winproto.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/apprt/gtk/winproto.zig')
-rw-r--r--vendor/libghostty-vt/src/apprt/gtk/winproto.zig23
1 files changed, 22 insertions, 1 deletions
diff --git a/vendor/libghostty-vt/src/apprt/gtk/winproto.zig b/vendor/libghostty-vt/src/apprt/gtk/winproto.zig
index d409d6c2..abf46d99 100644
--- a/vendor/libghostty-vt/src/apprt/gtk/winproto.zig
+++ b/vendor/libghostty-vt/src/apprt/gtk/winproto.zig
@@ -8,6 +8,7 @@ const Config = @import("../../config.zig").Config;
const input = @import("../../input.zig");
const key = @import("key.zig");
const ApprtWindow = @import("class/window.zig").Window;
+const GlobalShortcuts = @import("class/global_shortcuts.zig").GlobalShortcuts;
pub const noop = @import("winproto/noop.zig");
pub const x11 = @import("winproto/x11.zig");
@@ -78,6 +79,26 @@ pub const App = union(Protocol) {
inline else => |*v| try v.initQuickTerminal(apprt_window),
}
}
+
+ /// Bind all global keybinds through a mechanism native to the
+ /// windowing protocol. Returns false if there is none; the caller
+ /// should then fall back to the XDG desktop portal.
+ pub fn bindGlobalShortcuts(
+ self: *App,
+ shortcuts: *GlobalShortcuts,
+ config: *const Config,
+ ) bool {
+ return switch (self.*) {
+ inline else => |*v| v.bindGlobalShortcuts(shortcuts, config),
+ };
+ }
+
+ /// Unbind all global keybinds bound via bindGlobalShortcuts.
+ pub fn clearGlobalShortcuts(self: *App) void {
+ switch (self.*) {
+ inline else => |*v| v.clearGlobalShortcuts(),
+ }
+ }
};
/// Per-Window state for the underlying windowing protocol.
@@ -141,7 +162,7 @@ pub const Window = union(Protocol) {
};
}
- pub fn addSubprocessEnv(self: *Window, env: *std.process.EnvMap) !void {
+ pub fn addSubprocessEnv(self: *Window, env: *std.process.Environ.Map) !void {
switch (self.*) {
inline else => |*v| try v.addSubprocessEnv(env),
}