Skip to content

Commit

Permalink
Merge pull request #938 from contour-terminal/fix/revert-918
Browse files Browse the repository at this point in the history
Reverting #918 to fix rendering glitch.
  • Loading branch information
christianparpart authored Dec 22, 2022
2 parents 4edb692 + 5e69343 commit 36e2f10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<li>Fixes running within OpenGL/ES context.</li>
<li>Fixes failing startup due to `background_image.path` pointing to a non-existing file (#928).</li>
<li>Fixes terminfo entries `Se`, and adds missing entries `Rmol`, `Sync` (#936).</li>
<li>Fixes rendering glitches (reverting PR #918 until a better solution has been found).</li>
<li>Adds config entry `indicator_statusline_inactive` colorscheme key to colorize the status line differently when the terminal is currently not in focus.</li>
</ul>
</description>
Expand Down
11 changes: 4 additions & 7 deletions src/contour/display/TerminalWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,15 @@ void TerminalWidget::initializeGL()

void TerminalWidget::resizeGL(int _width, int _height)
{
Width const width =
profile().scrollbarPosition == config::ScrollBarPosition::Hidden
? Width::cast_from(_width - qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent))
: Width::cast_from(_width);
QOpenGLWidget::resizeGL(width.as<int>(), _height);
QOpenGLWidget::resizeGL(_width, _height);

if (!session_)
return;

auto const qtBaseWidgetSize = terminal::ImageSize { width, Height::cast_from(_height) };
auto const qtBaseWidgetSize =
terminal::ImageSize { Width::cast_from(_width), Height::cast_from(_height) };
auto const newPixelSize = qtBaseWidgetSize * contentScale();
DisplayLog()("Resizing view to {}x{} virtual ({} actual).", width, _height, newPixelSize);
DisplayLog()("Resizing view to {}x{} virtual ({} actual).", _width, _height, newPixelSize);
applyResize(newPixelSize, *session_, *renderer_);
}

Expand Down

0 comments on commit 36e2f10

Please sign in to comment.