mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
comments
This commit is contained in:
@ -761,10 +761,6 @@ pub fn keyCallback(
|
|||||||
self.ignore_char = false;
|
self.ignore_char = false;
|
||||||
|
|
||||||
if (action == .press or action == .repeat) {
|
if (action == .press or action == .repeat) {
|
||||||
// Convert our glfw input into a platform agnostic trigger. When we
|
|
||||||
// extract the platform out of this file, we'll pull a lot of this out
|
|
||||||
// into a function. For now, this is the only place we do it so we just
|
|
||||||
// put it right here.
|
|
||||||
const trigger: input.Binding.Trigger = .{
|
const trigger: input.Binding.Trigger = .{
|
||||||
.mods = mods,
|
.mods = mods,
|
||||||
.key = key,
|
.key = key,
|
||||||
@ -941,7 +937,7 @@ pub fn keyCallback(
|
|||||||
// Handle non-printables
|
// Handle non-printables
|
||||||
const char: u8 = char: {
|
const char: u8 = char: {
|
||||||
const mods_int = @bitCast(u8, mods);
|
const mods_int = @bitCast(u8, mods);
|
||||||
const ctrl_only = @bitCast(u8, glfw.Mods{ .control = true });
|
const ctrl_only = @bitCast(u8, input.Mods{ .ctrl = true });
|
||||||
|
|
||||||
// If we're only pressing control, check if this is a character
|
// If we're only pressing control, check if this is a character
|
||||||
// we convert to a non-printable.
|
// we convert to a non-printable.
|
||||||
|
@ -189,6 +189,7 @@ pub const Window = struct {
|
|||||||
return self.window.shouldClose();
|
return self.window.shouldClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set the title of the window.
|
||||||
pub fn setTitle(self: *Window, slice: [:0]const u8) !void {
|
pub fn setTitle(self: *Window, slice: [:0]const u8) !void {
|
||||||
try self.window.setTitle(slice.ptr);
|
try self.window.setTitle(slice.ptr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user