From 4832e3b3abc21397b6766ccde48e268842769157 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 30 Oct 2022 02:56:52 +0400 Subject: [PATCH] Fix the comment about surface size in media_view_pip Surface size is buffer size, in fact... --- Telegram/SourceFiles/media/view/media_view_pip.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/media/view/media_view_pip.cpp b/Telegram/SourceFiles/media/view/media_view_pip.cpp index eda0e8bcf..91d58ae30 100644 --- a/Telegram/SourceFiles/media/view/media_view_pip.cpp +++ b/Telegram/SourceFiles/media/view/media_view_pip.cpp @@ -619,7 +619,8 @@ void PipPanel::handleWaylandResize(QSize size) { ? QSize(max, max * _ratio.height() / _ratio.width()) : QSize(max * _ratio.width() / _ratio.height(), max); - // Buffer can't be bigger than surface size. + // Buffer can't be bigger than the configured + // (suggested by compositor) size. const auto byWidth = (scaled.width() * size.height()) > (scaled.height() * size.width()); const auto normalized = (byWidth && scaled.width() > size.width())