From 7cffdcb0a9da376b517858d99d88c2e04cc42bdb Mon Sep 17 00:00:00 2001 From: ntomsic Date: Wed, 20 May 2026 17:08:19 -0500 Subject: [PATCH] qt: temporary stderr diagnostics for the resize-overlay path Two fprintf calls so we can see what's happening on the user's machine when they resize: - showResizeOverlay logs the mode, current grid size, cached last- cols/rows, and whether we've registered the first-grid-seen flag. - paintResizeOverlay logs the cached text, the current and deadline timestamps, and the m_owner pointer. Both write to stderr so they appear when ghastty is launched from a terminal. The lines are prefixed [ghastty/dbg] for easy grepping; the diagnostic will be reverted once the rendering path is fixed. Co-Authored-By: claude-flow --- qt/src/GhosttySurface.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qt/src/GhosttySurface.cpp b/qt/src/GhosttySurface.cpp index f9b956d44..6a5ccba77 100644 --- a/qt/src/GhosttySurface.cpp +++ b/qt/src/GhosttySurface.cpp @@ -321,8 +321,16 @@ void GhosttySurface::paintEvent(QPaintEvent *) { static QString cfgString(ghostty_config_t cfg, const char *key); void GhosttySurface::paintResizeOverlay(QPainter &painter) { + const qint64 now = QDateTime::currentMSecsSinceEpoch(); + std::fprintf(stderr, + "[ghastty/dbg] paintResizeOverlay: text='%s' nowMs=%lld " + "untilMs=%lld owner=%p\n", + m_resizeOverlayText.toUtf8().constData(), + static_cast(now), + static_cast(m_resizeOverlayUntilMs), + static_cast(m_owner)); if (m_resizeOverlayText.isEmpty()) return; - if (QDateTime::currentMSecsSinceEpoch() >= m_resizeOverlayUntilMs) return; + if (now >= m_resizeOverlayUntilMs) return; if (!m_owner) return; ghostty_config_t cfg = m_owner->config(); @@ -467,6 +475,11 @@ void GhosttySurface::showResizeOverlay() { const ghostty_surface_size_s sz = ghostty_surface_size(m_surface); ghostty_config_t cfg = m_owner->config(); const QString mode = cfgString(cfg, "resize-overlay"); + std::fprintf(stderr, + "[ghastty/dbg] showResizeOverlay: mode=%s grid=%ux%u " + "lastCols=%d lastRows=%d firstSeen=%d\n", + mode.toUtf8().constData(), sz.columns, sz.rows, + m_lastCols, m_lastRows, m_firstGridSeen ? 1 : 0); if (mode == QLatin1String("never")) return; // First-call short-circuit. resizeEvent fires once when the