From 3eefaac8857852add4c36e6b984f437e14ebcc5c Mon Sep 17 00:00:00 2001 From: John Preston <johnprestonmail@gmail.com> Date: Wed, 10 Jan 2024 09:54:30 -0800 Subject: [PATCH] Fix screen sharing source choose window. --- .../calls/group/ui/desktop_capture_choose_source.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp b/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp index 87ac643d3..ad59290c5 100644 --- a/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp +++ b/Telegram/SourceFiles/calls/group/ui/desktop_capture_choose_source.cpp @@ -114,6 +114,7 @@ private: const not_null<RoundButton*> _finish; const not_null<Checkbox*> _withAudio; + QSize _fixedSize; std::vector<std::unique_ptr<Source>> _sources; Source *_selected = nullptr; QString _selectedId; @@ -337,7 +338,7 @@ void ChooseSourceProcess::setupPanel() { + (kRows - 1) * skips.height() + (st::desktopCaptureSourceSize.height() / 2) + bottomHeight; - _window->setFixedSize({ width, height }); + _fixedSize = QSize(width, height); _window->setStaysOnTop(true); _window->body()->paintRequest( @@ -598,6 +599,7 @@ void ChooseSourceProcess::setupGeometryWithParent( if (parentScreen && myScreen != parentScreen) { _window->windowHandle()->setScreen(parentScreen); } + _window->setFixedSize(_fixedSize); _window->move( parent->x() + (parent->width() - _window->width()) / 2, parent->y() + (parent->height() - _window->height()) / 2);