aports/testing/ghostty/0001-ReleaseSafe-is-not-debug.patch
2025-01-11 11:51:54 +00:00

23 lines
1021 B
Diff

From c6563b85e29aa17967ceda5b7a300b31960dbe75 Mon Sep 17 00:00:00 2001
From: LN Liberda <lauren@selfisekai.rocks>
Date: Fri, 27 Dec 2024 18:47:46 +0100
Subject: [PATCH] ReleaseSafe is not debug
---
src/apprt/gtk/Window.zig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig
index 48e88e49..918b7284 100644
--- a/src/apprt/gtk/Window.zig
+++ b/src/apprt/gtk/Window.zig
@@ -213,7 +213,7 @@ pub fn init(self: *Window, app: *App) !void {
// In debug we show a warning and apply the 'devel' class to the window.
// This is a really common issue where people build from source in debug and performance is really bad.
- if (comptime std.debug.runtime_safety) {
+ if (builtin.mode == .Debug) {
const warning_box = c.gtk_box_new(c.GTK_ORIENTATION_VERTICAL, 0);
const warning_text = "⚠️ You're running a debug build of Ghostty! Performance will be degraded.";
if ((comptime adwaita.versionAtLeast(1, 3, 0)) and