mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-29 03:47:54 +00:00
input: crash binding can configure which thread to crash
This commit is contained in:
@@ -268,6 +268,7 @@ fn drainMailbox(
|
||||
|
||||
log.debug("mailbox message={}", .{message});
|
||||
switch (message) {
|
||||
.crash => @panic("crash request, crashing intentionally"),
|
||||
.change_config => |config| {
|
||||
defer config.alloc.destroy(config.ptr);
|
||||
try io.changeConfig(data, config.ptr);
|
||||
|
||||
@@ -29,6 +29,10 @@ pub const Message = union(enum) {
|
||||
padding: renderer.Padding,
|
||||
};
|
||||
|
||||
/// Purposely crash the renderer. This is used for testing and debugging.
|
||||
/// See the "crash" binding action.
|
||||
crash: void,
|
||||
|
||||
/// The derived configuration to update the implementation with. This
|
||||
/// is allocated via the allocator and is expected to be freed when done.
|
||||
change_config: struct {
|
||||
|
||||
Reference in New Issue
Block a user