mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
gtk(mouse): use "text" enum as default value
Use the .text field of the enum as the default value of the mouse shape instead of renaming .default. Store the default value as the current value for use in subsequent commits
This commit is contained in:

committed by
Mitchell Hashimoto

parent
821a243239
commit
49fb5c8688
@ -424,7 +424,7 @@ pub fn setMouseShape(
|
|||||||
shape: terminal.MouseShape,
|
shape: terminal.MouseShape,
|
||||||
) !void {
|
) !void {
|
||||||
const name: [:0]const u8 = switch (shape) {
|
const name: [:0]const u8 = switch (shape) {
|
||||||
.default => "text",
|
.default => "default",
|
||||||
.help => "help",
|
.help => "help",
|
||||||
.pointer => "pointer",
|
.pointer => "pointer",
|
||||||
.context_menu => "context-menu",
|
.context_menu => "context-menu",
|
||||||
|
@ -21,6 +21,7 @@ const Tabstops = @import("Tabstops.zig");
|
|||||||
const trace = @import("tracy").trace;
|
const trace = @import("tracy").trace;
|
||||||
const color = @import("color.zig");
|
const color = @import("color.zig");
|
||||||
const Screen = @import("Screen.zig");
|
const Screen = @import("Screen.zig");
|
||||||
|
const mouse_shape = @import("mouse_shape.zig");
|
||||||
|
|
||||||
const log = std.log.scoped(.terminal);
|
const log = std.log.scoped(.terminal);
|
||||||
|
|
||||||
@ -84,6 +85,8 @@ previous_char: ?u21 = null,
|
|||||||
/// The modes that this terminal currently has active.
|
/// The modes that this terminal currently has active.
|
||||||
modes: modes.ModeState = .{},
|
modes: modes.ModeState = .{},
|
||||||
|
|
||||||
|
mouse_shape: mouse_shape.MouseShape = .text,
|
||||||
|
|
||||||
/// These are just a packed set of flags we may set on the terminal.
|
/// These are just a packed set of flags we may set on the terminal.
|
||||||
flags: packed struct {
|
flags: packed struct {
|
||||||
// This isn't a mode, this is set by OSC 133 using the "A" event.
|
// This isn't a mode, this is set by OSC 133 using the "A" event.
|
||||||
|
@ -1902,7 +1902,7 @@ const StreamHandler = struct {
|
|||||||
self: *StreamHandler,
|
self: *StreamHandler,
|
||||||
) !void {
|
) !void {
|
||||||
self.terminal.fullReset(self.alloc);
|
self.terminal.fullReset(self.alloc);
|
||||||
try self.setMouseShape(.default);
|
try self.setMouseShape(.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn queryKittyKeyboard(self: *StreamHandler) !void {
|
pub fn queryKittyKeyboard(self: *StreamHandler) !void {
|
||||||
|
Reference in New Issue
Block a user