diff --git a/src/contour/display/TerminalDisplay.cpp b/src/contour/display/TerminalDisplay.cpp index 46043658c2..15a6d40ebd 100644 --- a/src/contour/display/TerminalDisplay.cpp +++ b/src/contour/display/TerminalDisplay.cpp @@ -1071,7 +1071,11 @@ bool TerminalDisplay::isFullScreen() const vtbackend::ImageSize TerminalDisplay::pixelSize() const { assert(_session); - return gridMetrics().cellSize * _session->terminal().pageSize(); + auto const scaledWindowMargins = applyContentScale(_session->profile().margins.value(), contentScale()); + auto const scaledWindowMarginsPixels = + vtbackend::ImageSize { Width::cast_from(unbox(scaledWindowMargins.horizontal) * 2), + Height::cast_from(unbox(scaledWindowMargins.vertical) * 2) }; + return gridMetrics().cellSize * _session->terminal().pageSize() + scaledWindowMarginsPixels; } vtbackend::ImageSize TerminalDisplay::cellSize() const