mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-22 07:15:19 +00:00
Merge branch 'main' into disable-color-management
This commit is contained in:
@@ -667,6 +667,7 @@ fn gtkWindowNotifyDecorated(
|
||||
// class is defined in the GtkWindow documentation:
|
||||
// https://docs.gtk.org/gtk4/class.Window.html#css-nodes. A definition
|
||||
// for .ssd is provided by GTK and Adwaita.
|
||||
toggleCssClass(@ptrCast(object), "csd", is_decorated);
|
||||
toggleCssClass(@ptrCast(object), "ssd", !is_decorated);
|
||||
toggleCssClass(@ptrCast(object), "no-border-radius", !is_decorated);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ pub fn run(alloc_gpa: Allocator) !u8 {
|
||||
// print a message, otherwise we do nothing.
|
||||
if (reports.items.len == 0) {
|
||||
if (std.posix.isatty(stdout.handle)) {
|
||||
try stdout.writeAll("No crash reports! 👻");
|
||||
try stdout.writeAll("No crash reports! 👻\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -471,16 +471,15 @@ vertex CellTextVertexOut cell_text_vertex(
|
||||
out.color = contrasted_color(uniforms.min_contrast, out.color, out.bg_color);
|
||||
}
|
||||
|
||||
// If this cell is the cursor cell, then we need to change the color.
|
||||
if (
|
||||
in.mode != MODE_TEXT_CURSOR &&
|
||||
(
|
||||
// Check if current position is under cursor (including wide cursor)
|
||||
bool is_cursor_pos = (
|
||||
in.grid_pos.x == uniforms.cursor_pos.x ||
|
||||
uniforms.cursor_wide &&
|
||||
in.grid_pos.x == uniforms.cursor_pos.x + 1
|
||||
) &&
|
||||
in.grid_pos.y == uniforms.cursor_pos.y
|
||||
) {
|
||||
) && in.grid_pos.y == uniforms.cursor_pos.y;
|
||||
|
||||
// If this cell is the cursor cell, then we need to change the color.
|
||||
if (in.mode != MODE_TEXT_CURSOR && is_cursor_pos) {
|
||||
out.color = load_color(
|
||||
uniforms.cursor_color,
|
||||
uniforms.use_display_p3,
|
||||
@@ -490,7 +489,8 @@ vertex CellTextVertexOut cell_text_vertex(
|
||||
|
||||
// Don't bother rendering if the bg and fg colors are identical, just return
|
||||
// the same point which will be culled because it makes the quad zero sized.
|
||||
if (all(out.color == out.bg_color)) {
|
||||
// However, we should still render if this is the cursor position
|
||||
if (all(out.color == out.bg_color) && !is_cursor_pos) {
|
||||
out.position = float4(0.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user