mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-27 02:56:28 +00:00
input: crash binding can configure which thread to crash
This commit is contained in:
@@ -270,6 +270,8 @@ fn drainMailbox(self: *Thread) !void {
|
||||
while (self.mailbox.pop()) |message| {
|
||||
log.debug("mailbox message={}", .{message});
|
||||
switch (message) {
|
||||
.crash => @panic("crash request, crashing intentionally"),
|
||||
|
||||
.visible => |v| {
|
||||
// Set our visible state
|
||||
self.flags.visible = v;
|
||||
|
||||
@@ -8,6 +8,10 @@ const terminal = @import("../terminal/main.zig");
|
||||
|
||||
/// The messages that can be sent to a renderer thread.
|
||||
pub const Message = union(enum) {
|
||||
/// Purposely crash the renderer. This is used for testing and debugging.
|
||||
/// See the "crash" binding action.
|
||||
crash: void,
|
||||
|
||||
/// A change in state in the window focus that this renderer is
|
||||
/// rendering within. This is only sent when a change is detected so
|
||||
/// the renderer is expected to handle all of these.
|
||||
|
||||
Reference in New Issue
Block a user