mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
don't require runtimes to implement all callbacks
This commit is contained in:
@ -917,8 +917,17 @@ pub fn keyCallback(
|
|||||||
}, .{ .instant = {} });
|
}, .{ .instant = {} });
|
||||||
},
|
},
|
||||||
|
|
||||||
.previous_tab => self.rt_surface.gotoPreviousTab(),
|
.previous_tab => {
|
||||||
.next_tab => self.rt_surface.gotoNextTab(),
|
if (@hasDecl(apprt.Surface, "gotoPreviousTab")) {
|
||||||
|
self.rt_surface.gotoPreviousTab();
|
||||||
|
} else log.warn("runtime doesn't implement gotoPreviousTab", .{});
|
||||||
|
},
|
||||||
|
|
||||||
|
.next_tab => {
|
||||||
|
if (@hasDecl(apprt.Surface, "gotoNextTab")) {
|
||||||
|
self.rt_surface.gotoNextTab();
|
||||||
|
} else log.warn("runtime doesn't implement gotoNextTab", .{});
|
||||||
|
},
|
||||||
|
|
||||||
.close_window => {
|
.close_window => {
|
||||||
_ = self.app_mailbox.push(.{ .close = self }, .{ .instant = {} });
|
_ = self.app_mailbox.push(.{ .close = self }, .{ .instant = {} });
|
||||||
|
Reference in New Issue
Block a user