From 4a95e8e48cdb3555ade20e7e3959a12856a1a6b4 Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:50:34 +0800 Subject: [PATCH 1/5] Fix cursor character not visible when cursor color matches background --- src/renderer/shaders/cell.metal | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/renderer/shaders/cell.metal b/src/renderer/shaders/cell.metal index 3ca0f9149..5f161c6b7 100644 --- a/src/renderer/shaders/cell.metal +++ b/src/renderer/shaders/cell.metal @@ -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); } From 0c1f3d724dcf087a86b41a153fc470ab4d432f6e Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Wed, 5 Feb 2025 09:01:15 +0100 Subject: [PATCH 2/5] gtk: remove CSD styling when CSDs aren't used Fixes #2023 --- src/apprt/gtk/Window.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig index 3a72e1752..bb49165b9 100644 --- a/src/apprt/gtk/Window.zig +++ b/src/apprt/gtk/Window.zig @@ -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); From 47e50abe24de72205be30c0e0bdd2de27c1496a2 Mon Sep 17 00:00:00 2001 From: Kat <65649991+00-kat@users.noreply.github.com> Date: Wed, 5 Feb 2025 08:22:58 +0000 Subject: [PATCH 3/5] Add a final newline to "No crash reports!" --- src/cli/crash_report.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/crash_report.zig b/src/cli/crash_report.zig index dd5fe99cc..ff8509797 100644 --- a/src/cli/crash_report.zig +++ b/src/cli/crash_report.zig @@ -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; } From 1d7f041f55f012afc5af27d98a828e13f29751fe Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 5 Feb 2025 10:44:38 -0800 Subject: [PATCH 4/5] macos: update Sparkle to 2.6.4 to workaround security issue https://github.com/ghostty-org/ghostty/security/dependabot/4 --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macos/Ghostty.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/macos/Ghostty.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d380910a8..5ace476e0 100644 --- a/macos/Ghostty.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/macos/Ghostty.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/sparkle-project/Sparkle", "state" : { - "revision" : "b456fd404954a9e13f55aa0c88cd5a40b8399638", - "version" : "2.6.3" + "revision" : "0ef1ee0220239b3776f433314515fd849025673f", + "version" : "2.6.4" } } ], From ae25ad4047f80896458049208653d2b5ee025944 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 5 Feb 2025 11:23:22 -0800 Subject: [PATCH 5/5] Introduce subsystem maintainers via CODEOWNERS This commit introduces the proposed subsystem maintainer system for Ghostty. This commit doesn't assign anyone yet to the subsystems, but defines the CODEOWNERS file, creates the GitHub teams, and documents the system. --- CODEOWNERS | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..835244ebc --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,149 @@ +# This file documents the subsystem maintainers of the Ghostty project +# along with the responsibilities of a maintainer and how one can become +# a maintainer. +# +# Ghostty follows a subsystem maintainer model where distinguished +# contributors (with mutual agreement) are designated as maintainers of a +# specific subset of the project. A subsystem maintainer has more privileges +# and authority over a specific part of the project than a regular +# contributor and deference is given to them when making decisions about +# their subsystem. +# +# Ultimately Ghostty has a BDFL (Benevolent Dictator For Life) model +# currently with @mitchellh as the BDFL. The BDFL has the final say in all +# decisions and may override a maintainer's decision if necessary. I like to +# say its a BDFLFN (Benevolent Dictator For Life "For Now") model because +# long term I'd like to see the project be more community driven. But for +# now, early in its life, we're going with this model. +# +# ## Privileges +# +# - Authority to approve or reject pull requests in their subsystem. +# - Authority to moderate issues and discussions in their subsystem. +# - Authority to make roadmap and design decisions about their subsystem +# with input only from other subsystem maintainers. +# +# In all scenarios, the BDFL doesn't need to be consulted for decisions +# but may revert or override decisions if necessary. The expectation is +# that maintainers will be trusted to make the right decisions for their +# subsystem and this will be rare. +# +# ## Responsibilities +# +# Subsystem maintainership is a voluntary role and maintainers are not +# expected to dedicate any amount of time to the project. However, if a +# maintainer is inactive for a long period of time, they may be removed from +# the maintainers list to avoid bitrot or outdated information. +# +# Maintainers are expected to be exemplary members of the community and +# should be respectful, helpful, and professional in all interactions. +# This is both in regards to the community at large as well as other +# subsystem maintainers as well as @mitchellh. +# +# As technical leaders, maintainers are expected to be mindful about +# breaking changes, performance, user impact, and other technical +# considerations in their subsystem. They should be considerate of large +# changes and should be able to justify their decisions. +# +# Notably, maintainers have NO OBLIGATION to review pull requests or issues +# in their subsystem. They have full discretion to review or not review +# anything they want. This isn't a job! It is a role of trust and authority +# and the expectation is that maintainers will use their best judgement. +# +# ## Becoming a Maintainer +# +# Maintainer candidates are noticed and proposed by the community. Anyone +# may propose themselves or someone else as a maintainer. The BDFL along +# with existing maintainers will discuss and decide. +# +# Generally, we want to see consistent high quality contributions to a +# specific subsystem before considering someone as a maintainer. There isn't +# an exact number of contributions or time period required but generally +# we're looking for an order of a dozen or more contributions over a period of +# months, at least. +# +# # Subsystem List +# +# The subsystems don't fully cover the entirety of the Ghostty project but +# are created organically as experts in certain areas emerge. If you feel +# you are an expert in a certain area and would like to be a maintainer, +# please reach out to @mitchellh on Discord. +# +# (Alphabetical order) +# +# - @ghostty-org/font - All things font related including discovery, +# rasterization, shaping, coloring, etc. +# +# - @ghostty-org/gtk - Anything GTK-related in the project, primarily +# the GTK apprt. Also includes X11/Wayland integrations and general +# Linux support. +# +# - @ghostty-org/macos - The Ghostty macOS app and any macOS-specific +# features, configurations, etc. +# +# - @ghostty-org/renderer - Ghostty rendering subsystem, including the +# rendering abstractions as well as specific renderers like OpenGL +# and Metal. +# +# - @ghostty-org/shell - Ghostty shell integration, including shell +# completions, shell detection, and any other shell interactions. +# +# - @ghostty-org/terminal - The terminal emulator subsystem, including +# subprocess management and pty handling, escape sequence parsing, +# key encoding, etc. +# +# ## Outside of Ghostty +# +# Other "subsystems" exist outside of Ghostty and will not be represented +# in this CODEOWNERS file: +# +# - @ghostty-org/discord-bot - Maintainers of the Ghostty Discord bot. +# +# - @ghostty-org/website - Maintainers of the Ghostty website. + +# Font +/src/font/ @ghostty-org/font +/pkg/fontconfig/ @ghostty-org/font +/pkg/freetype/ @ghostty-org/font +/pkg/harfbuzz/ @ghostty-org/font + +# GTK +/src/apprt/gtk/ @ghostty-org/gtk +/src/os/cgroup.zig @ghostty-org/gtk +/src/os/flatpak.zig @ghostty-org/gtk +/dist/linux/ @ghostty-org/gtk + +# macOS +# +# This includes libghostty because the macOS apprt is built on top of +# libghostty and often requires or is impacted by changes to libghostty. +# macOS subsystem maintainers are expected to only work on libghostty +# insofar as it impacts the macOS apprt. +/include/ghostty.h @ghostty-org/macos +/src/apprt/embedded.zig @ghostty-org/macos +/src/os/cf_release_thread.zig @ghostty-org/macos +/src/os/macos.zig @ghostty-org/macos +/macos/ @ghostty-org/macos +/dist/macos/ @ghostty-org/macos +/pkg/apple-sdk/ @ghostty-org/macos +/pkg/macos/ @ghostty-org/macos + +# Renderer +/src/renderer.zig @ghostty-org/renderer +/src/renderer/ @ghostty-org/renderer +/pkg/glslang/ @ghostty-org/renderer +/pkg/opengl/ @ghostty-org/renderer +/pkg/spirv-cross/ @ghostty-org/renderer +/pkg/wuffs/ @ghostty-org/renderer + +# Shell +/src/shell-integration/ @ghostty-org/shell +/src/termio/shell-integration.zig @ghostty-org/shell + +# Terminal +/src/simd/ @ghostty-org/terminal +/src/terminal/ @ghostty-org/terminal +/src/terminfo/ @ghostty-org/terminal +/src/unicode/ @ghostty-org/terminal +/src/Surface.zig @ghostty-org/terminal +/src/surface_mouse.zig @ghostty-org/terminal